Sometimes we get the error “The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again”, when we upload a document into a document library..
We can solve this by going to Central Administration–> Application Management–> Web Application General Settings and set the Web page Security Validation to Off. But this operation affects the whole application and we should not do that. This is not the exact solution of this error also.
Now the exact reason of this error is either PlaceHolderFormDigest ContentPlaceHolder is missing in Master Page or PlaceHolderFormDigest ContentPlaceHolder’s visibility is False.
PlaceHolderFormDigest is the “form digest” security control. So we need to check the Master Page file once. For doing this we have to open the SharePoint Designer and click on File-> Open Site and provide the site url and click on Open. Now we have to navigate through _catalogs–> masterpage(Master Page Gallery) and we will find the desired Master Page of our site. We need to open the Master Page file and search for “PlaceHolderFormDigest”. If this ContentPlaceHolder is not present, we need to place this in the Master Page like following way:-
<asp:ContentPlaceHolder id="PlaceHolderFormDigest" runat="server"> <SharePoint:FormDigest runat=server/> </asp:ContentPlaceHolder>
If this ContentPlaceHolder is present already in the Master Page and its visibility is false, then we should set its visibility to true to get rid of the error.