WebDAV Merging in Microsoft Office
In this article
WebDAV Merging in Microsoft Office
Microsoft Office can merge changes with updates made by other user(s). Here is how merging works:
- User1 opens a document for editing. The document is locked for editing by User1.
-
User2 opens same document for editing. As soon as the document is locked by User1, the server throws LockedException in ILock.LockAsync() method implementation:
The code below is part of 'WebDAVServer.FileSystemStorage.AspNet' C# & VB samples provided with the SDK.
The code below is part of 'WebDAVServer.FileSystemStorage.AspNet' C# & VB samples provided with the SDK.
The server replies with 423, "Locked", code. User2 is presented with the following dialog:
User2 selects "Edit the file and merge your changes with the server file when it becomes available." option and edits the document.
- User1 saves and closes the document. The document ETag is updated and the document is unlocked.
- User2 saves the document. The document is locked by User2. The WebDAV server automatically compares ETag associated with a document with ETag sent by User2. If they do not match, the documents are automatically merged by MS Office or a merging UI is presented by MS Office.
During lock, unlock and lock refresh requests your file modification date must NOT change. If the file modification date changes and you have Protected View enabled, Microsoft Office displays the "File updated. <File> has been changed by another author." dialog: