I came across the error "The web being updated was changed by an external process." when i was debugging a sharepoint code, in which I had changed the System Master Page and Site Master Page present in the page _Layouts/ChangeSiteMasterPage.aspx of the Publishing sharepoint site.
This issue came up because, the SPWeb object was not being disposed. As a result it was becoming stale. And when we try to call the update method of the SPweb object it fails.
The best way to handle this issue is to Dispose the SPWeb Object whenever possible and re-create it once again before you go ahead with any other sharpeoint change through code.
Hope this helps some one....
Disposing the SPWeb object(s) indeed solved the issue.
ReplyDeleteThanks SSM, this saved me alot of work!