尝试 SPWeb 重命名时,我收到以下 SPException:
Exception SPException - The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again. - Failed to create workgroup registration entry
知道这里可能有什么麻烦吗?以下是相关代码:
SPSecurity.RunWithElevatedPrivileges(() =>
{
using (SPWeb thisWeb = site.OpenWeb(webUrl))
{
thisWeb.Title = newName;
thisWeb.Update();
}
});