0

I started working with the WebDAVSharp.Server library to make it work in a custom project of mine.

The amount of changes I had to do was breathtaking.

I have reached the point of making it work in an acceptable manner for my case, but I still have an issue with Office 2003 opening the files as read only.

I have fixed the non-root problem that I had, and my server responds to the PROPFIND and OPTIONS methods on all the levels of the webdav link, but Office 2003 opens the document as read-only and when trying to save it on the WebDav URL manually, it stops itself from saving the document after my PROPFIND response. And I cannot find why it does that, because I have checked almost everything. Also, newer Office versions (e.g. 2013, 2016) don't have this problem.

Here is the request from MS Word:

Word Request

And here is the WebDav response:

WebDav Response

And here are the response headers:

Response Headers

I am not an expert on WebDav, but it asks for all the properties of the documents and the response gives it just that. What else does it want?

Also, it never sends a LOCK method, so I doubt it is a LOCK problem.

And the request flow is like that:

Requests flow

The unauthorized requests are because it first sends the request without credentials and then it re-tries with credentials.

The first PROPFIND is for the containing folder/collection. I give a proper response to that, signifying it is a folder.

Folder PROPFIND response

What is weird, is that Office 2003 never seems to issue an OPTIONS request, so I never send the MS-Author-Via header. So, this can be what causes the problem, but what can I do to force it send this request?

Any ideas or hints are welcome. I am sure there are people out there that can find the problem by simply looking at this.

UPDATE:

After seeing this, I added the Win32FileAttributes property and others from the same Microsoft namespace, but I still don't see any improvement in the behavior. This is my new PROPFIND response XML:

New PROPFIND response

But I think I should approach it the other way around: Find out why after the GET method the document is in Read-Only mode.

One thing that I also fixed, is to trust my proxy certificate, which changed the request flow to this:

New request flow with trusted cert

user2173353
  • 4,316
  • 4
  • 47
  • 79
  • Office 2003 is more than a decade old and end of life. – Lex Li Nov 14 '20 at 14:14
  • @LexLi Yes, I know... I wish I could dump it too, but I try to support it out of necessity. Or, maybe, out of lack of persuasion towards the people that ask for it. Or excessive stubbornness from their side... On the bright side, I won't have to worry about software updates breaking it! – user2173353 Nov 14 '20 at 14:33

0 Answers0