Recently, I created a custom InfoPath form which worked fine on the preview. After publishing to a SharePoint List, the Web form's attachment control in a repeating section failed with the following error.
"The security Validation for this page is invalid. Click back in your Web Browser, refresh the page and try your operation again"
I made the following changes to fix the error.
- In the 14 hive, click on the TEMPLATE -> Layouts folder.
- Backup the formserver.aspx file as we will be editing this file.
- Edit the formserver.aspx using the notepad.exe.
- Under the < body runat="server" id="PageBody"> tag, add the following line of code.
<SharePoint:FormDigest runat="server" />
Retry the InfoPath web form, it should be working now.