Investigation on why Excel shared workbook doesn’t work on Webdav


By using Webdav, we are able to share the files via a unique url. This can bring a lot of convenience to us for the purpose of web sharing. However, as the Webdav works on the base of HTTP protocol, it lacks sufficient support for “distributed authoring”. This makes it impossible to displace the traditional file systems.

Recently, I got a case which customer failed to use excel shared workbook mode on Webdav. Meanwhile, it works well with UNC file sharing.

Although files stored on the Webdav server can be opened in windows file explore just like opening a normal file in the UNC folder, the protocol used in the background is totally different between them.

By analyzing the fiddler traces, we can clearly see that when opening an excel file on the Webdav, a write exclusive lock will be set on it to prevent the other users from editing it at the same time:

Request

LOCK /test2.xlsx HTTP/1.1

<?xml version="1.0" encoding="utf-8" ?><D:lockinfo xmlns:D="DAV:"><D:lockscope><D:exclusive/></D:lockscope><D:locktype><D:write/>

</D:locktype><D:owner><D:href>Dodoma\user1</D:href></D:owner></D:lockinfo>

Response

HTTP/1.1 200 OK

<?xml version="1.0" encoding="utf-8"?><D:prop xmlns:D="DAV:"> <D:lockdiscovery><D:activelock><D:locktype><D:write/></D:locktype><D:lockscope><D:exclusive/>

</D:lockscope><D:depth>0</D:depth><D:owner><D:href>FAREAST\jinjiez</D:href></D:owner><D:timeout>Second-3600</D:timeout><D:locktoken><D:href>opaquelocktoken:55b7993c-7891-480c-ba35-3869c264a899.43cd01d11e0a9ebe</D:href></D:locktoken><D:lockroot><D:href>http://zz-jinjiez-w10:9000/test2.xlsx</D:href></D:lockroot></D:activelock></D:lockdiscovery></D:prop>

Then if another user wants to open the same file, he will be informed that the file is locked and is read-only:

Request

LOCK /test.xlsx HTTP/1.1

<?xml version="1.0" encoding="utf-8" ?><D:lockinfo xmlns:D="DAV:"><D:lockscope><D:exclusive/></D:lockscope><D:locktype><D:write/></D:locktype>

<D:owner><D:href>FAREAST\jinjiez</D:href></D:owner></D:lockinfo>

Response

HTTP/1.1 423 Locked Error

Furthermore, if we check with the process monitor trace log, we can also see an exclusive lock set on the file when opening the excel file:

clip_image002

clip_image004

By contrast, if we open the same excel file via UNC, we don’t see any lock operations:

clip_image006

According to the analysis above, we can see it’s reasonable for excel shared workbook mode not working on Webdav, as the background working principal is totally different from UNC file sharing even though their user interfaces look similar.

Compared with other file sharing method, Webdav is rather used for allowing clients to perform remote Web content authoring operations. Thus, we need to choose the appropriate method of file sharing based on the different specification.

Best Regards,

Jinjie ZHOU from APAC DSI Team


Comments (0)

Skip to main content