I have a custom WebDAV server built using the Sphoirum webdav server , which is inside the ASP.NET MVC3 application. This is a .Net 4.0 project.
The document repository is SharePoint, where our MVC application is the interface for it and provides all this through WebDAV. Just note that in our version of IIS 7.5 there is no WebDAV publication.
I have implemented the following HTTP verbs:
- Get
- Chapter
- Lock
- Options
- PROPFIND
- Put
- Open
Now when I open a Word document, it is first in read-only mode. Getting the lock and in edit mode is successful, but when I want to save the changes to my document, I get the following:
Your changes have been saved but not uploaded due to an error.
The trick is that the document is really correctly stored in the repository, and the response from our WebDAV server to the word is HTTP / 200, but Word still complains. I also tried editing in Word directly from the SharePoint repository, just to confirm that my office wasn’t broken somehow - everything works.
Here is the response from the PUT request when saving a document from Word:
HTTP/1.1 200 OK Date: Tue, 06 Sep 2011 12:25:47 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET MicrosoftSharePointTeamServices: 12.0.0.6545 Last-Modified: Tue, 06 Sep 2011 12:25:47 GMT ETag: "{F4A63494-D302-4C9B-9C57-D0CB0937A2B0},9" ResourceTag: rt: F4A63494-D302-4C9B-9C57-D0CB0937A2B0@00000000009 X-MSDAVEXTLockTimeout: Second-3600 Lock-Token: opaquelocktoken:{F4A63494-D302-4C9B-9C57-D0CB0937A2B0}20110906T122532Z Expires: Mon, 22 Aug 2011 12:25:47 GMT Cache-Control: private,max-age=0 Content-Length: 0 Public-Extension: http:
And here is the same answer for the same document from our WebDAV server:
HTTP/1.1 200 OK Cache-Control: private,max-age=0 Content-Length: 0 Expires: Wed, 24 Aug 2011 08:03:28 GMT Last-Modified: Wed, 07 Sep 2011 08:03:28 GMT ETag: "{4a4331a8-7df6-43e6-bd5f-bb80765e83a2},1" Server: Microsoft-IIS/7.5 MS-Author-Via: DAV ResourceTag: rt: 4a4331a8-7df6-43e6-bd5f-bb80765e83a2@00000000001 Lock-Token: opaquelocktoken:{4a4331a8-7df6-43e6-bd5f-bb80765e83a2}20110907T080328Z X-MSDAVEXTLockTimeout: Second-3600 Public-Extension: http://schemas.microsoft.com/repl-2 MicrosoftSharePointTeamServices: 12.0.0.6545 Set-Cookie: WSS_KeepSessionAuthenticated=40689; path=/ X-Powered-By: ASP.NET Date: Wed, 07 Sep 2011 08:03:27 GMT
So, I tried to mimic some SharePoint headers like MicrosoftSharePointTeamServices, but to no avail.