I have a scenario where users may update a list item at the same time and this causes a Save Conflict error.

I could catch the exception and reload the list item as suggested in http://adrianhenke.wordpress.com/2010/08/20/sharepoint-error-save-conflict-your-changes-conflict-with-those-made-concurrently-by-another-user/ but I'm concerned that reloading the list item may not be foul-proof.

Would applying a lock help?

    private static readonly object oLock = new object();

        using(SPSite site = new SPSite("http://site.com")
             using(SPWeb web = site.OpenWeb("/subsite"))
                   SPList list = new web.Lists["ListName"];
                   SPListItem item = list.GetItemById(idNo);

1 Answer 1


Applying lock would help you and also you should add some sleep after updating the listitem. But this does not mean that error will never occur. So after updating your code you should test it properly with simultaneously updates.

  • Thanks for the help, Aanchal! I would still need to add sleep? Are there other scenarios I haven't seen in which the error can still occur? I thought that acquiring the lock before opening the list and list item can help me from preventing the error.
    – Celbester
    Jun 18, 2014 at 6:05
  • 1
    Yes, it would. But i have read that sharepoint also aquire some temporary lock while updating, that's why i suggest to add sleep. Also you should add try catch block and in catch block try to reload the item and apply update.
    – Aanchal
    Jun 18, 2014 at 6:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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