Posted by: Shantham | March 9, 2009

The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.


The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.

The above error will be thrown at the time of updating Library or Lists items due to authentication problem, or We didn’t have the rights to update the items.
By using the follwoing code, We can overcome this issue,

Web.AllowUnsafeUpdates = true;
item[“Title”]=”Sample”;
item.Update();

or we can also use the follwoing code to overcome the above error, this will affect the WebApplication. This will change the Security settings of a Web Application to allow the anonymous user to update item.

web.Site.WebApplication.FormDigestSettings.Enabled = false;
item[“Title”]=”Sample”;
item.Update();
web.Site.WebApplication.FormDigestSettings.Enabled = true;

or we can change the settings in Central Administration to anonymously update the items. But this method will be dangerous.

  • Central Administration > Application Management > Web Application General Settings
  • Choose the WebApplication to overwrite the settings
  • Select the option Off in Web Page Security Validation as follows,

securitysettings1

Read more…

Advertisements

Responses

  1. Hi Shantha Kumar,
    I am currently facing the same issue, while debugging my code I can able to access the sharepoint sites & lists from my custom page. But when I host that website on IIS it’s giving me the same error
    “The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.”
    I had tried out all the options you have mentioned as well as few others.
    1. Set AllowUnsafeUpdates property of SPWeb / SPSite to true
    2. Set web.Site.WebApplication.FormDigestSettings.Enabled to false
    3. writing code inside SPSecurity.RunWithElevatedPrivileges()
    4. using WindowsImpersonationContext wic = WindowsIdentity.GetCurrent().Impersonate()
    5. Changing authentication provider in Central Administration
    • Central Administration > Application Management > Authentication Providers
    • Select “Zone”
    • Check “Enable Anonymous Access”
    6. Turn off Web Page Security Validation in Central Administration
    • Central Administration > Application Management > Web Application General Settings
    • Select the option Off in Web Page Security Validation
    But none of them working for me except turn off the security validation from Central Administration, but it’s not the safe way to do it.
    Please guide me,
    Anand

  2. this really helped me. Thanks so much for posting.
    I spent more than 11 hrs trying to get this to work – keep up the good work!

  3. Thanks,
    It works for me.

  4. Yeah really good and helpfull. Thanks for the article

  5. […] here https://ktskumar.wordpress.com/2009/03/09/the-security-validation-for-this-page-is-invalid-click-back… Uncategorized2007, sharepoint, […]

  6. […] https://ktskumar.wordpress.com/2009/03/09/the-security-validation-for-this-page-is-invalid-click-back… […]

  7. saya tidak bisa daftar mwo

  8. Hi,

    Thanks, it worked for me. Indeed you saved quite a lot of effort of mine.

    Thanks again,

    Regards,
    Anand

  9. I get the following error when i try to allow
    Web.AllowUnsafeUpdates = true

    Request for the permission of type ‘Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’ failed.

  10. thanks man
    it really helped me.

    You saved lot of searching time for me.

    Regards
    Venkatesh

  11. You may also try this approach as discussed here http://sharepointtechie.blogspot.com/2011/02/solution-security-validation-for-this.html

  12. […] https://ktskumar.wordpress.com/2009/03/09/the-security-validation-for-this-page-is-invalid-click-back… GA_googleAddAttr("AdOpt", "1"); GA_googleAddAttr("Origin", "other"); GA_googleAddAttr("LangId", "1"); GA_googleAddAttr("Autotag", "technology"); GA_googleAddAttr("Tag", "errors-2"); GA_googleAddAttr("Tag", "sharepoint"); GA_googleFillSlot("wpcom_below_post");   LikeBe the first to like this post. […]

  13. Thank you buddy.. It is worked for me..

  14. I had trouble with this exact error message, and none of the tricks here mentioned or other places helped me at all, but I think this solution that I figured out can help many others out there as well:
    HttpContext.Current.Items[“FormDigestValidated”] = true;

  15. Doing
    web.ValidateFormDigest();
    like was suggested at
    http://sharepointtechie.blogspot.com/2011/02/solution-security-validation-for-this.html
    and
    http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.utilities.sputility.validateformdigest.aspx
    (which are cited above in other posts) will also cause this error, even after putting in the fix, so I removed it so the fix could work.

    I fixed it using both
    web.AllowUnsafeUpdates = true;
    web.Site.WebApplication.FormDigestSettings.Enabled = false;
    and re-enabled FormDigestSettings (set to true) at the end of my code. I might’ve only needed one or the other but didn’t want to chance it.

    To anyone trying web.ValidateFormDigest(), you probably did more harm than good – remove this from your code and try the other lines, here and it should work.

    To the author of this blog: THANK YOU for this blog! 🙂

    -Tom

  16. Update to my other comment:
    Found that doing
    web.Site.WebApplication.FormDigestSettings.Enabled = false;
    does not work anyway, even with RunWithElevatedPrivileges if your System Account (really the account that is running your App Pool, configured by your SharePoint Admin) is not a farm admin account, which ours was not. It was really just the web.AllowUnsafeUpdates = true that I needed.

  17. Its Works ……….thanks alot
    Shantan

  18. It is working for me.
    Thanks
    Gaurav Goyal

  19. Thanks for sharing your brain dump.
    Its Working in my case.
    Keep sharing your knowledge

  20. thanks man working fine

  21. Thanks alot .. this solved my problem 🙂

  22. Because of FormDIgest control we got this issue.
    Refer it know why?
    http://sasikumarreddyv.blogspot.in/2012/03/wherewhenwhy-formdigest-control.html

  23. thank you very much. It worked fine. However,

    i want to know the potential issues that may cause in making security to ‘off’. I guess the recommended is ‘on’

    please clarify my doubt.

    thank you.

  24. thanks for the post

    regards,
    ziauddin

  25. Hi,this is really helped a lot thanq for sharing

  26. Really Help to me….. thanks a lot.

  27. Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your blog?
    My blog is in the very same area of interest as yours and my visitors would
    really benefit from a lot of the information you present here.
    Please let me know if this ok with you. Thanks!

  28. It’s remarkable for me to have a web site, which is good designed for my know-how. thanks admin

  29. In the event that, your current claim is straightforward, such as, the vehicle encountered modest damages and no health-related help
    was essential then you are merely necessary to give a rough idea in the maintenance.
    The actual surveyor will analyze it and mainly settle what
    he claims. In case your current claim involves legal
    responsibility, or in the event the car insurance coverage is insufficient or
    perhaps you are certainly not satisfied with the type of give made, after that youll have
    to start the actual negotiation process together with your vehicle
    insurance company.

    Being aware what a from pocket optimum is and exactly what it limitations
    is crucial if you wish to choose the best arrange for your self.
    Disregarding this part of the plan may cause you to definitely purchase the wrong plan or lead you to
    end up having a big, unwanted as well as unexpected medical expense.
    car discount rates, regarding drivers using multiple
    Allstate plans, along with regarding students and also elderly people.
    |Therefore , the company could provide you with
    (your loan company, actually) 35 dollars, 000 for the VEHICLE.

    And you also are obligated to pay $48, 300. That is ok,
    appropriate? The money company may realize. They will just without having
    which $13, 200 you still are obligated to repay them, proper?
    Umm, incorrect.|

  30. I’d like to thank you for the efforts you’ve put in penning this site.
    I’m hoping to see the same high-grade content by you later on as well. In truth, your creative writing abilities has motivated me to get my own, personal site now 😉

  31. Helpful info. Lucky me I found your web site by chance, and I’m shocked why this accident didn’t took place earlier!

    I bookmarked it.

  32. With havin so much written content do you ever run into any problems of plagorism or
    copyright violation? My site has a lot of completely unique content I’ve either written myself or outsourced but it looks like a lot of it is popping it up all over the internet without my agreement. Do you know any solutions to help prevent content from being stolen? I’d really appreciate it.

  33. Greetings! I’ve been following your weblog for a while now and finally got the courage to go ahead and give you a shout out from Humble Texas! Just wanted to tell you keep up the great work!

  34. Since it is simpler than to run a shop in the market-place to run a virtual on-line shop that to your shop which offers anything to you beneath the sun that can
    be purchased online stores give year long reductions. Also these online stores like Overstock.
    com provide unique discount including overstock coupon signal for promotional and publicity purpose.
    Although a geniune Overstock promotion is difficult to find but once you obtain it be sure to be stunned.

    Overstock Coupon is of very good use, because it has increased the fad
    of on the web buying by many times among the mind of men and
    women. It has also several getting things which improve its need.
    Several kinds of coupon rules are there Free Ship Coupon Code, namely Money
    Saver Coupon Code and several more; all are employed for different
    purposes.
    Now these codes are being out of stock to accomplish business.

    This can be also comfortable for the consumers as
    they are now free from the danger of advertising
    with a huge amount of cash. Even some recharge internet sites and web sites have started the Overstock Coupon program.
    They feature schemes like on a charge of Rs.

    10 only 1 can get 200-400 concession on buying Rs 999 and above.
    By using these techniques, even the small-scale web sites are increasing their sales.
    A margin has been fixed by many shopping sites such that shopping beyond that
    certain amount would endure no shipping cost. Coupon codes are now available to even
    reduce the shipping cost.

  35. Pretty great post. I simply stumbled upon your blog and wanted to mention that I
    have truly enjoyed browsing your blog posts. After all I
    will be subscribing on your rss feed and I hope you write once more soon!

  36. It’s difficult to find well-informed people for this subject, but you sound like you know what you’re talking about!
    Thanks

  37. What a information of un-ambiguity and preserveness of precious
    know-how concerning unexpected feelings.

  38. I really like reading an article that will make
    people think. Also, many thanks for permitting me to comment!

  39. Some are more specific, and such attorneys excel in their niche field.

    Calling the first personal injury lawyer TV, radio or newspaper ad you come across will often lead to a
    poor matching of lawyer to client. Even if your personal injury claim appears to
    be straightforward, your case may not be as simple as it first seems.

  40. From Rang De Basanti, which laid the foundation for social activism, to Kuch
    Kuch Hota Hai which started a less favourable trend of
    Lycra T-Shirts, Bollywood influences abound
    in our day-to-day life. Keeping the flowers and the foliage in small sizes make them blend smoothly.
    The narrow border frame in teal green colour has a set of flowers in red and
    blue neatly arranged throughout the border.

  41. You post very interesting articles here. Your page deserves
    much more visitors. It can go viral if you give it initial boost, i know very useful tool that
    can help you, simply search in google: svetsern traffic tips

  42. […] The security validation for this page is invalid. Click Back in your Web browser, refresh the page, … […]

  43. […] The security validation for this page is invalid. Click Back in your Web browser, refresh the page, … […]

  44. By my research, shopping for consumer electronics online can for sure be expensive, yet there are some tricks and tips that you can use to acquire the best offers. There are generally ways to uncover discount bargains that could make one to possess the best electronic products products at the smallest prices. Thanks for your blog post.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: