.NET Server

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:

  1. User1 opens a document for editing. The document is locked for editing by User1.
  2. 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:

    WebDAV MS Office Merge dialog. User selects: Edit the file and merge your changes with the server file when it becomes available.

    User2 selects "Edit the file and merge your changes with the server file when it becomes available." option and edits the document.

  3. User1 saves and closes the document. The document ETag is updated and the document is unlocked.
  4. 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:
 File Updated. file.docx has been changed by another author. Do you want to: Combine your changes with the other authors’ changes. All changes will be merged into a single document and marked up so that you can pick which individual changes to keep. Save a copy of file.docx. Your changes will be saved in a file separate from the other authors’ changes.

 

Next Article:

Choosing WebDAV Server Authentication Schema