3

We implemented our own WebDAV server. Some users having Office (Word, Excel) open documents read-only. On problem computers queries are next:

  1. OPTIONS http://pastie.org/10957339, response (after some chain of NTLM auth): http://pastie.org/10957337 (equal to these ones, where problem not reproduces)
  2. GET
  3. HEAD
  4. HEAD

Normal queries (on healthy computers) are: OPTIONS, HEAD, LOCK, GET... So, Word do not attempts to LOCK document, and opens it readonly.

We have already tried:

  1. Checked WebDAV link, it is ofe (as you can see in OPTIONS query)
  2. Checked, that OPTIONS response contains header MS-Author-Via: DAV
  3. Checked, that server does not crash. All responses are OK.
  4. Set registry key HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Common\Internet\OpenDocumentsReadWriteWhileBrowsing to 1 as said here.
  5. Set registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\BasicAuthLevel to 2, and HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common\Internet\BasicAuthLevel to 2 as said here.
  6. Open documents from https://www.ajaxbrowser.com - all OK, documents opens read-write.
  7. Clearing cookies in IE, logging in IE (to provide cookies for MS Word)
  8. Trying to find differences between problem computers and healthy ones. Problem reproducing on different versions of Office, different versions of Windows (7, 8, 10), all computers connected over proxy (healthy ones too).
  9. Сlear keys in HKEY_CURRENT_USER\Software\Microsoft\Office\<version>\Common\Internet\Server Cache as said here.

Have any clue? Why is Office not trying to LOCK the document?

Pavel
  • 2,602
  • 1
  • 27
  • 34
  • @DirkVollmar after that first OPTIONS request is going GET. GET is ok, but it already means, that document opens readonly, as LOCK not performed. I compared OPTIONS response with working ones, no difference found.There [response](http://pastie.org/10958933) for working app (on my dev PC), you can compare it with client ones, they are identical. – Pavel Nov 09 '16 at 11:10
  • What's the full response for the OPTIONS request? Can you also send the HTTP requests and responses for the PROPFIND request? – Evert Nov 09 '16 at 18:22
  • @Evert as written in the post, response is [this](http://pastie.org/10957337). PROFIND usually occurs before save, if I dont mismatch. We are not going to save document, because it is readonly. Anyway I will see tommorow, if any PROFIND exists. – Pavel Nov 09 '16 at 19:03
  • 1
    Unfortunately the pasties don't work (any more). But (and this is actually unfortunate too) your question and the addition by @evert where the only comprehensive list of requirements for Word to communicate with WebDAV I could find. THANKS A LOT for your perfectly edited question! – Michael Mar 03 '17 at 05:38

2 Answers2

4

You are at least missing the DAV header. Include this in the OPTIONS response:

DAV: 1,2
Evert
  • 93,428
  • 18
  • 118
  • 189
  • Interesting. Docs [says](https://msdn.microsoft.com/en-us/library/aa142827(v=exchg.65).aspx), that class '2' means allowing LOCK method. Looks hopefully, I will try... – Pavel Nov 10 '16 at 04:54
  • @Pavel don't read the Microsoft docs. Read the [standard](http://tools.ietf.org/html/rfc4918). – Evert Nov 10 '16 at 05:16
  • I agree that the Microsoft docs are to a very big extend not helpful or useful at all. But as MS often adds additional quirks (I was missing the _MS-Author-Via_ header) and it's about getting Word to play along, we won't really get around. – Michael Mar 03 '17 at 05:44
0

The problem was in interaction of MS Office and proxy-server. When we started fiddler (instead of WireShark), that creates local proxy for catching traffic, the WebDAV begun to work correctly.

Pavel
  • 2,602
  • 1
  • 27
  • 34