您的位置:首页 > 其它

Sharepoint:The security validation for this page is invalid. Click Back in your Web browserSharepoin

2013-08-12 11:29 761 查看
Sometimes while trying to delete documents or move documents from one library to another we get an error "The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again” while trying to move
documents from one document library to another document library."

This error is caused due to security validation. So there should be a way out to turn it off. One method to turn off security is:

Central Administration—>application management—->web application general settings–>turn security validation off

But, if we always keep it on there might be danger of malicious code.

So, we should handle this through coding, turn off security validation for our code to execute and then again turn it on.

SPWeb ospWeb = SPContext.Current.Web;

Microsoft.SharePoint.Administration.SPWebApplication webApp = ospWeb.Site.WebApplication;

webApp.FormDigestSettings.Enabled = false;

// our code should be inserted here

webApp.FormDigestSettings.Enabled = true;

For more details, visit http://techolyvia.wordpress.com/2008/10/24/the-security-validation-for-this-page-is-invalid-click-back-in-your-web-browser-refresh-the-page-and-try-your-operation-again/
/article/7005495.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐