0

I have a C# application from which I am uploading documents to a SharePoint 2010 Document Library (with version history enabled). The line of code I am using to upload the document is the one below:

Web.Files.Add(destinationURL, documentFileStream, metaDataHashTable, trueBooleanToOverwriteChanges);

The problem is occurring when I am uploading a document while having the edit page form of another document opened in a browser. When I try to click the Save button, it displays the mentioned error (The settings for this list have been recently changed. Refresh your browser before editing this list.)

I have upgraded the Sharepoint Foundation with the HotFix mentioned here but it didn't solve the problem.

Bridge
  • 29,818
  • 9
  • 60
  • 82

1 Answers1

0

I had same problem I done using EventFiringEnabled.

If you don't have any event receiver on particular list/libraries then use this.

this.EventFiringEnabled = false;

Web.Files.Add(destinationURL, documentFileStream, metaDataHashTable, trueBooleanToOverwriteChanges);

 this.EventFiringEnabled = true;

and if you have event receiver associated with list/libraries then use same before starting code and make it true in finally block

Nalaka526
  • 11,278
  • 21
  • 82
  • 116
Mahesh276
  • 3
  • 1