SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having an issue with my "add file" control in InfoPath. When I preview the InfoPath form it works fine; however, when I publish the form to the SharePoint site (browser enabled) I get an error when I try to upload an attachment in the form.

I am using InfoPath 2010 and SharePoint 2010. I have never had this issue before.

The error I get is:

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

share|improve this question

This can be caused by having anonymous access enabled on a site as well as another form of authentication, or from having checked out a document prior to authenticating to the SharePoint site, or from not having the appropriate permissions to update the list item (or document in a library).

The first thing I would try is to validate your permissions.

If that does not resolve the issue, Shantha Kumar suggests setting Web.AllowUnsafeUpdates = true; or web.Site.WebApplication.FormDigestSettings.Enabled = false; before updating the item. If the second method is used it needs to be reset to true after the list item is updated.

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

Also, see June 2011 CU Woes – Workaround for InfoPath forms error which suggests to add <SharePoint:FormDigest runat="server" /> in the body of FormServer.aspx in the LAYOUTS folder of the 14 hive.

Hope this helps.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.