質問

I am building a file service support WebDAV protocol from scratch using ASP.NET WebAPI. The first step is to response to the OPTIONS request from WebDAV client (i used MS Office 2010 in this case). When got that request, my service will return these information (captured by Fiddle 2). The service is run under IIS server.

The service allows MS Office to open the file at this url: https://fileservice.domain.com/api/OfficeClient?dir=C:\Test\WebApi.docx

HTTP/1.1 200 OK
Allow: COPY,DELETE,GET,HEAD,LOCK,MOVE,OPTIONS,POST,PROPFIND,PROPPATCH,PUT,REPORT,UNLOCK
Content-Length: 0
Accept-Ranges: bytes
Server: Microsoft-IIS/7.5
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: ACL, CANCELUPLOAD, CHECKIN, CHECKOUT, COPY, DELETE, GET, HEAD, LOCK, MKCALENDAR, MKCOL, MOVE, OPTIONS, POST, PROPFIND, PROPPATCH, PUT, REPORT, UNCHECKOUT, UNLOCK, UPDATE, VERSION-CONTROL
Access-Control-Allow-Headers: Overwrite, Destination, Content-Type, Depth, User-Agent, Translate, Range, Timeout, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control
Access-Control-Max-Age: 2147483647
DAV: 1
Public: COPY, DELETE, GET, HEAD, LOCK, MOVE, OPTIONS, POST, PROPFIND, PROPPATCH, PUT, REPORT, UNLOCK
MS-Author-Via: DAV
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Wed, 29 May 2013 04:36:19 GMT

The problem is that, MS Office kept sending 5 same OPTIONS request. The next request it is supposed to send should be HEAD, and then a series of other methods to open a document. I do have a look at: http://sourceforge.net/projects/webdav/?source=navbar implementation. And also try to run demo from http://www.webdavsystem.com/server/ and look at the Fiddle. But i cannot find any differences in my example and the online demo.

役に立ちましたか?

解決

I managed to solve the issue. It is the URL issue and lot of other stuff. I cannot write down the detail here since it is a complex implementation. Just want to make sure that noone will waste time on trying to answer the question.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top