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.