This SharePoint tutorial, we will discuss how to solve the security validation for this page is invalid error and also we will discuss how to resolve The security validation for this page has timed out error in SharePoint 2010/2013.
Also, we will see how to use FormDigest control in SharePoint 2010/2013.
The security validation for this page is invalid SharePoint
For reasons of security, by default, Microsoft SharePoint Foundation does not allow you to make posts from a Web application to modify the contents of the database unless you include security validation on the page making the request.
But you can update data for a single site or for a site collection by adding a page directive and a FormDigest control to the page that makes the request.
For this we need to do 2 things:
Register the SharePoint web controls assembly in your aspx like below at top of the .aspx page:
<%@ Register TagPrefix=”SharePoint” Namespace=”Microsoft.SharePoint.WebControls”
Assembly=”Microsoft.SharePoint, Version=184.108.40.206, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %>
Place the FormDigest control on the .aspx page like below:
<sharepoint:formdigest id=”FormDigest1″ runat=”server” />
Through code also we can do this like below:
protected override void OnInit(EventArgs e)
The security validation is specific to a user, site, and time period and expires after a configurable amount of time. When the user requests a page, the server returns the page with security validation inserted. When the user then submits the form, the server verifies that the security validation has not changed.
The security validation for this page has timed out error in SharePoint 2010
Now, we will see how to resolve The security validation for this page has timed out. Click Back in your Web browser, refresh the page, and try your operation again.
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Microsoft.SharePoint.WebPartPages.WebPartPageUserException: The security validation for this page has timed out. Click Back in your Web browser, refresh the page, and try your operation again.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
I tried the below solution and it works for me:
First, open the SharePoint 2010 central administration and then from the Application Management section, Click on Manage web applications. This will open the Web applications list page.
Select the particular web application and click on General Settings from the Ribbon.
This will open the Web Applications General Settings dialog box.
From there Web page Security Validations property, Change the Security validations expires which is by default 30 minutes to Never as shown in the figure below:
You may like following SharePoint tutorials:
- Add a custom web part to the page layout in SharePoint 2013 or SharePoint 2010
- How to create a flyout menu in SharePoint 2010
- How to use the WebProvisioned event in SharePoint 2010?
- Disadvantages of external lists in BCS Business Connectivity Services in SharePoint 2013/2010
- SPSecurityTrimmedControl in SharePoint 2013/2010
- How to display or show breadcrumbs in SharePoint 2010?
- Create Visual Web Part using Visual Studio 2010 in SharePoint 2010
- Differences Between Sandboxed and Farm Solutions in SharePoint 2013
- Correlation ID in SharePoint 2010
- Powershell and STSADM command to install activate feature SharePoint 2010/2013/2016
- Cannot make a cache safe URL for filename, file not found. Please verify that the file exists under the layouts directory
Hope this SharePoint tutorial helps how to resolve The security validation for this page is invalid and The security validation for this page has timed out error in SharePoint 2010/2013.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com
Download SharePoint Online Tutorial PDF FREE!
Get update on Webinars, video tutorials, training courses etc.