WebDAV only working on one machine? - webdav
I have implemented IT Hits WebDAV server on our company website. We a currently using a trial licence to develop the product which expires Sunday, September 07, 2014.
I have managed to get a working prototype working on my local build and I have checked it into our company TFS server.
It works perfectly on my machine and when people connect to my PC through the network it work OK too.
However when my manager has gotten latest and tested the new edit functionality on his local machine it will not work. I checked the error log there are no errors.
My main question does the trial version of the WebDAV server only work
on one machine? Does it some how detect which machine the licence has been active on and restrict it to this machine.
If the licence can work on multiple machines do you have any suggestions to help debug the issue?
The log below is from the machine which does not work:
[5] ----------------- Started: 13/08/2014 10:42:29 -----------------
[5] [OPTIONS] /DAV/cdef1072-d16a-4e42-a87c-301ded0b96c0/fcf65118-e733-40f6-807b-cdcde0e47df4/
Connection: Keep-Alive
Cookie: username=adrian
Host: localhost
User-Agent: Microsoft Office Word 2013 (15.0.4631) Windows NT 6.2
X-MSGETWEBURL: t
X-IDCRL_ACCEPTED: t
[5] HTTP/1.1 200 OK
X-Env-Version : 4.0.30319.34014 64bit
X-OS-Version : Microsoft Windows NT 6.3.9600.0
X-IIS-Version : Microsoft-IIS/8.5
X-Worker-Request : System.Web.Hosting.IIS7WorkerRequest
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, Content-Range, Timeout, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Location, Lock-Token, If
Access-Control-Expose-Headers : DAV, content-length
Access-Control-Max-Age : 2147483647
X-Engine : IT Hit WebDAV Server .Net v3.7.1780.0 (Evaluation License)
DAV : 1, 2, 3
Allow : COPY, DELETE, GET, HEAD, LOCK, MOVE, OPTIONS, POST, PROPFIND, PROPPATCH, PUT, REPORT, UNLOCK
Public : COPY, DELETE, GET, HEAD, LOCK, MOVE, OPTIONS, POST, PROPFIND, PROPPATCH, PUT, REPORT, UNLOCK
Accept-Ranges : bytes
MS-Author-Via : DAV
[5] ----------------- Finished: 13/08/2014 10:42:33 Took 3828ms--------
[45] ----------------- Started: 13/08/2014 10:42:33 -----------------
[45] [HEAD] /DAV/cdef1072-d16a-4e42-a87c-301ded0b96c0/fcf65118-e733-40f6-807b-cdcde0e47df4/cbbh.docx
Connection: Keep-Alive
Cookie: username=adrian
Host: localhost
User-Agent: Microsoft Office Word 2013 (15.0.4631) Windows NT 6.2
X-IDCRL_ACCEPTED: t
[45] HTTP/1.1 200 OK
X-Env-Version : 4.0.30319.34014 64bit
X-OS-Version : Microsoft Windows NT 6.3.9600.0
X-IIS-Version : Microsoft-IIS/8.5
X-Worker-Request : System.Web.Hosting.IIS7WorkerRequest
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, Content-Range, Timeout, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Location, Lock-Token, If
Access-Control-Expose-Headers : DAV, content-length
Access-Control-Max-Age : 2147483647
X-Engine : IT Hit WebDAV Server .Net v3.7.1780.0 (Evaluation License)
Content-Type : application/vnd.openxmlformats-officedocument.wordprocessingml.document
Last-Modified : Mon, 01 Jan 0001 00:00:00 GMT
Content-Length : 11231
[45] ----------------- Finished: 13/08/2014 10:42:34 Took 1234ms--------
[49] ----------------- Started: 13/08/2014 10:42:35 -----------------
[49] [OPTIONS] /DAV/cdef1072-d16a-4e42-a87c-301ded0b96c0/fcf65118-e733-40f6-807b-cdcde0e47df4/
Connection: Keep-Alive
Cookie: username=adrian
Host: localhost
User-Agent: Microsoft Office Word 2013 (15.0.4631) Windows NT 6.2
X-IDCRL_ACCEPTED: t
[49] HTTP/1.1 200 OK
X-Env-Version : 4.0.30319.34014 64bit
X-OS-Version : Microsoft Windows NT 6.3.9600.0
X-IIS-Version : Microsoft-IIS/8.5
X-Worker-Request : System.Web.Hosting.IIS7WorkerRequest
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, Content-Range, Timeout, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Location, Lock-Token, If
Access-Control-Expose-Headers : DAV, content-length
Access-Control-Max-Age : 2147483647
X-Engine : IT Hit WebDAV Server .Net v3.7.1780.0 (Evaluation License)
DAV : 1, 2, 3
Allow : COPY, DELETE, GET, HEAD, LOCK, MOVE, OPTIONS, POST, PROPFIND, PROPPATCH, PUT, REPORT, UNLOCK
Public : COPY, DELETE, GET, HEAD, LOCK, MOVE, OPTIONS, POST, PROPFIND, PROPPATCH, PUT, REPORT, UNLOCK
Accept-Ranges : bytes
MS-Author-Via : DAV
[49] ----------------- Finished: 13/08/2014 10:42:36 Took 1234ms--------
The next log below is from my working version:
[60] ----------------- Started: 13/08/2014 12:15:10 -----------------
[60] [OPTIONS] /DAV/07f23d4c-7b7c-4018-921b-18bb3f469f0d/eff37f65-4266-4f00-9993-5529d8d9edaf/
Connection: Keep-Alive
Cookie: username=mark
Host: localhost
User-Agent: Microsoft Office Word 2013 (15.0.4631) Windows NT 6.2
X-MSGETWEBURL: t
X-IDCRL_ACCEPTED: t
[60] HTTP/1.1 200 OK
X-Env-Version : 4.0.30319.34014 64bit
X-OS-Version : Microsoft Windows NT 6.3.9600.0
X-IIS-Version : Microsoft-IIS/8.5
X-Worker-Request : System.Web.Hosting.IIS7WorkerRequest
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, Content-Range, Timeout, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Location, Lock-Token, If
Access-Control-Expose-Headers : DAV, content-length
Access-Control-Max-Age : 2147483647
X-Engine : IT Hit WebDAV Server .Net v3.7.1780.0 (Evaluation License)
DAV : 1, 2, 3
Allow : COPY, DELETE, GET, HEAD, LOCK, MOVE, OPTIONS, POST, PROPFIND, PROPPATCH, PUT, REPORT, UNLOCK
Public : COPY, DELETE, GET, HEAD, LOCK, MOVE, OPTIONS, POST, PROPFIND, PROPPATCH, PUT, REPORT, UNLOCK
Accept-Ranges : bytes
MS-Author-Via : DAV
[60] ----------------- Finished: 13/08/2014 12:15:10 Took 640ms--------
[48] ----------------- Started: 13/08/2014 12:15:10 -----------------
[48] [HEAD] /DAV/07f23d4c-7b7c-4018-921b-18bb3f469f0d/eff37f65-4266-4f00-9993-5529d8d9edaf/Test%20Document.docx
Connection: Keep-Alive
Cookie: username=mark
Host: localhost
User-Agent: Microsoft Office Word 2013 (15.0.4631) Windows NT 6.2
X-IDCRL_ACCEPTED: t
[48] HTTP/1.1 200 OK
X-Env-Version : 4.0.30319.34014 64bit
X-OS-Version : Microsoft Windows NT 6.3.9600.0
X-IIS-Version : Microsoft-IIS/8.5
X-Worker-Request : System.Web.Hosting.IIS7WorkerRequest
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, Content-Range, Timeout, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Location, Lock-Token, If
Access-Control-Expose-Headers : DAV, content-length
Access-Control-Max-Age : 2147483647
X-Engine : IT Hit WebDAV Server .Net v3.7.1780.0 (Evaluation License)
Content-Type : application/vnd.openxmlformats-officedocument.wordprocessingml.document
Last-Modified : Mon, 01 Jan 0001 00:00:00 GMT
Content-Length : 11323
[48] ----------------- Finished: 13/08/2014 12:15:11 Took 453ms--------
[54] ----------------- Started: 13/08/2014 12:15:11 -----------------
[54] [OPTIONS] /DAV/07f23d4c-7b7c-4018-921b-18bb3f469f0d/eff37f65-4266-4f00-9993-5529d8d9edaf/
Connection: Keep-Alive
Cookie: username=mark
Host: localhost
User-Agent: Microsoft Office Word 2013 (15.0.4631) Windows NT 6.2
X-IDCRL_ACCEPTED: t
[54] HTTP/1.1 200 OK
X-Env-Version : 4.0.30319.34014 64bit
X-OS-Version : Microsoft Windows NT 6.3.9600.0
X-IIS-Version : Microsoft-IIS/8.5
X-Worker-Request : System.Web.Hosting.IIS7WorkerRequest
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, Content-Range, Timeout, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Location, Lock-Token, If
Access-Control-Expose-Headers : DAV, content-length
Access-Control-Max-Age : 2147483647
X-Engine : IT Hit WebDAV Server .Net v3.7.1780.0 (Evaluation License)
DAV : 1, 2, 3
Allow : COPY, DELETE, GET, HEAD, LOCK, MOVE, OPTIONS, POST, PROPFIND, PROPPATCH, PUT, REPORT, UNLOCK
Public : COPY, DELETE, GET, HEAD, LOCK, MOVE, OPTIONS, POST, PROPFIND, PROPPATCH, PUT, REPORT, UNLOCK
Accept-Ranges : bytes
MS-Author-Via : DAV
[54] ----------------- Finished: 13/08/2014 12:15:12 Took 468ms--------
[45] ----------------- Started: 13/08/2014 12:15:12 -----------------
[45] [LOCK] /DAV/07f23d4c-7b7c-4018-921b-18bb3f469f0d/eff37f65-4266-4f00-9993-5529d8d9edaf/Test%20Document.docx
Cache-Control: no-cache
Connection: Keep-Alive
Pragma: no-cache
Content-Length: 220
Content-Type: text/xml; charset="utf-8"
Cookie: username=mark
Host: localhost
User-Agent: Microsoft Office Word 2013 (15.0.4631) Windows NT 6.2
Translate: f
Timeout: Second-3600
X-IDCRL_ACCEPTED: t
[45] <?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>ORCHIDSOFT\Danial.Westmorland</D:href></D:owner></D:lockinfo>
[45] HTTP/1.1 200 OK
X-Env-Version : 4.0.30319.34014 64bit
X-OS-Version : Microsoft Windows NT 6.3.9600.0
X-IIS-Version : Microsoft-IIS/8.5
X-Worker-Request : System.Web.Hosting.IIS7WorkerRequest
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, Content-Range, Timeout, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Location, Lock-Token, If
Access-Control-Expose-Headers : DAV, content-length
Access-Control-Max-Age : 2147483647
X-Engine : IT Hit WebDAV Server .Net v3.7.1780.0 (Evaluation License)
Lock-Token : <opaquelocktoken:94cd8ec7-b26e-4c14-9507-f6231a1812be>
Content-Type : application/xml; charset=utf-8
[45] <?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>infinity</d:depth>
<d:locktoken>
<d:href>opaquelocktoken:94cd8ec7-b26e-4c14-9507-f6231a1812be</d:href>
</d:locktoken>
<d:timeout>Second-28799</d:timeout>
<d:owner>ORCHIDSOFT\Danial.Westmorland</d:owner>
<d:lockroot>
<d:href>https://localhost:443/DAV/07f23d4c-7b7c-4018-921b-18bb3f469f0d/eff37f65-4266-4f00-9993-5529d8d9edaf/Test%20Document.docx</d:href>
</d:lockroot>
</d:activelock>
</d:lockdiscovery>
</d:prop>
[45] ----------------- Finished: 13/08/2014 12:15:13 Took 844ms--------
[64] ----------------- Started: 13/08/2014 12:15:13 -----------------
[64] [GET] /DAV/07f23d4c-7b7c-4018-921b-18bb3f469f0d/eff37f65-4266-4f00-9993-5529d8d9edaf/Test%20Document.docx
Connection: Keep-Alive
Content-Type: text/xml; charset="utf-8"
Cookie: username=mark; 88b20e20-4b54-4be9-ab03-4b434b9e4d1f=1001
Host: localhost
User-Agent: Microsoft Office Word 2013 (15.0.4631) Windows NT 6.2
Translate: f
Depth: 0
X-IDCRL_ACCEPTED: t
[64] HTTP/1.1 200 OK
X-Env-Version : 4.0.30319.34014 64bit
X-OS-Version : Microsoft Windows NT 6.3.9600.0
X-IIS-Version : Microsoft-IIS/8.5
X-Worker-Request : System.Web.Hosting.IIS7WorkerRequest
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, Content-Range, Timeout, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Location, Lock-Token, If
Access-Control-Expose-Headers : DAV, content-length
Access-Control-Max-Age : 2147483647
X-Engine : IT Hit WebDAV Server .Net v3.7.1780.0 (Evaluation License)
Content-Length : 11323
Accept-Ranges : bytes
Content-Type : application/vnd.openxmlformats-officedocument.wordprocessingml.document
Last-Modified : Mon, 01 Jan 0001 00:00:00 GMT
[64] ----------------- Finished: 13/08/2014 12:15:13 Took 500ms--------
[83] ----------------- Started: 13/08/2014 12:15:14 -----------------
[83] [PROPFIND] /DAV/07f23d4c-7b7c-4018-921b-18bb3f469f0d/eff37f65-4266-4f00-9993-5529d8d9edaf/Test%20Document.docx
Cache-Control: no-cache
Connection: Keep-Alive
Pragma: no-cache
Content-Length: 208
Content-Type: text/xml; charset="utf-8"
Cookie: username=mark; 88b20e20-4b54-4be9-ab03-4b434b9e4d1f=1001
Host: localhost
User-Agent: Microsoft Office Word 2013 (15.0.4631) Windows NT 6.2
Translate: f
Depth: 0
X-IDCRL_ACCEPTED: t
[83] <?xml version="1.0" encoding="utf-8" ?><D:propfind xmlns:D="DAV:" xmlns:Office="urn:schemas-microsoft-com:office:office"><D:prop><D:creationdate/><D:getlastmodified/><Office:modifiedby/></D:prop></D:propfind>
[83] HTTP/1.1 207 Multi-Status
X-Env-Version : 4.0.30319.34014 64bit
X-OS-Version : Microsoft Windows NT 6.3.9600.0
X-IIS-Version : Microsoft-IIS/8.5
X-Worker-Request : System.Web.Hosting.IIS7WorkerRequest
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, Content-Range, Timeout, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Location, Lock-Token, If
Access-Control-Expose-Headers : DAV, content-length
Access-Control-Max-Age : 2147483647
X-Engine : IT Hit WebDAV Server .Net v3.7.1780.0 (Evaluation License)
Content-Type : application/xml; charset=utf-8
[83] <?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:d="DAV:">
<d:response>
<d:href>https://localhost:443/9917c323-7aae-4d06-8ebe-7349f9dd4c23</d:href>
<d:propstat>
<d:status>HTTP/1.1 200 OK</d:status>
<d:prop />
</d:propstat>
<d:propstat>
<d:status>HTTP/1.1 404 Not Found</d:status>
<d:prop>
<modifiedby xmlns="urn:schemas-microsoft-com:office:office" />
</d:prop>
<d:responsedescription>Property was not found</d:responsedescription>
</d:propstat>
</d:response>
</d:multistatus>
[83] ----------------- Finished: 13/08/2014 12:15:14 Took 579ms--------
[45] ----------------- Started: 13/08/2014 12:15:15 -----------------
[45] [HEAD] /DAV/07f23d4c-7b7c-4018-921b-18bb3f469f0d/eff37f65-4266-4f00-9993-5529d8d9edaf/Test%20Document.docx
Connection: Keep-Alive
Content-Length: 0
Cookie: username=mark
Host: localhost
User-Agent: Microsoft Office Existence Discovery
X-IDCRL_ACCEPTED: t
[45] HTTP/1.1 200 OK
X-Env-Version : 4.0.30319.34014 64bit
X-OS-Version : Microsoft Windows NT 6.3.9600.0
X-IIS-Version : Microsoft-IIS/8.5
X-Worker-Request : System.Web.Hosting.IIS7WorkerRequest
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, Content-Range, Timeout, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control, Location, Lock-Token, If
Access-Control-Expose-Headers : DAV, content-length
Access-Control-Max-Age : 2147483647
X-Engine : IT Hit WebDAV Server .Net v3.7.1780.0 (Evaluation License)
Content-Type : application/vnd.openxmlformats-officedocument.wordprocessingml.document
Last-Modified : Mon, 01 Jan 0001 00:00:00 GMT
Content-Length : 11323
[45] ----------------- Finished: 13/08/2014 12:15:16 Took 438ms--------
I've finally figured out the issue.
When I checked the IIS server on the PC that was not working I noticed that WebDAV Authoring Rules an installed feature. I then checked my PC and this was not installed.
http://i2.iis.net/media/7427780/installing-and-configuring-webdav_webdav_home_pane3.jpg?cdn_id=2012-08-15-001
Once I removed this it worked for me.
I removed it by creating the following .cmd file in notepad:
start dism.exe /online /disable-feature /featurename:IIS-WebDAV
All IT Hit products, including IT Hit WebDAV Server Engine for .Net are fully functional and does not have any limitations. It should be working on any machine and on more than one machine with a trial license.
Please take a look at how to deploy the sample server shipped with WebDAV Server Engine to IIS here: How to Configure Your WebDAV Server in IIS.
Even though each WebDAV server has its own specifics and this guide may not be applicable in your case, it helps to understand the typical deployment scenario and security configuration.
Here are some recommendations about haw to understand what is going wrong:
Examine WebDAV requests with a Fiddler tool or any other debugging
proxy. While all requests that reached the WebDAV server Engine are
logged, if the request failed before hitting the Engine, you will not
see it in a log. Usually this happens if the request failed during
authentication stage.
Note that to capture requests using Fiddler on 'localhost' you must
use 'localhost.fiddler' instead of 'localhost' when connecting to
server, for example: http://localhost.fiddler:1234.
Run Ajax integration tests. Just create a WebDAV project with Visual Studio to get the tests page. Than specify Url of your WebDAV server right on a tests page. Are there any failed tests?
Exclude any client side issues. There could be issues with
client software that you are using, including with Microsoft
miniredirector. Try to access server from any other machine. To get
the idea if the problem is on the client or server side try also to
reproduce the issue on ajaxbrowser.com.
Related
Python requests.get returns 500 for only one specific url in Google Cloud Function, works fine in local machine
I have a google cloud function to get response of the two urls, but I got 500 for the second, the first isfine: https://api.racing.com/v1/en-au/meet/details/5158389/ https://api.racing.com/v1/en-au/meet/details/5158194/ url = 'https://api.racing.com/v1/en-au/meet/details/5158194/' requests.get(url, headers=headers) And both works fine in the local machine. Any ideas? Thanks Updates: So far, I have tried set TLS and cache-control in the header, none works: class Tls12HttpAdapter(HTTPAdapter): def init_poolmanager(self, connections, maxsize, block=False): self.poolmanager = PoolManager( num_pools=connections, maxsize=maxsize, block=block, ssl_version=ssl.PROTOCOL_TLSv1_2) s = requests.Session() s.mount(url, Tls12HttpAdapter()) r = s.get(url, headers=headers) I also tried using curl to get the output: result = subprocess.run("curl -i --tlsv1.2 https://api.racing.com/v1/en-au/meet/details/5158389/", shell=True, capture_output=True) I found the difference between the working url and non-working url is in the cache-control field: the working one: CompletedProcess(args='curl -i --tlsv1.2 https://api.racing.com/v1/en-au/meet/details/5158389/', returncode=0, stdout=b'HTTP/2 200 \r\naccess-control-allow-headers: content-Type, accept, origin, X-Requested-With, DataServiceVersion, MaxDataServiceVersion\r\naccess-control-allow-methods: PUT, POST, GET, DELETE, MERGE, OPTIONS\r\naccess-control-allow-origin: *\r\n cache-control: public, max-age=180\r\ncontent-type: text/javascript; charset=utf-8\r\n x-aspnet-version: 4.0.30319\r\nx-powered-by: ASP.NET\r\ndate: Sun, 08 Dec 2019 23:26:38 GMT\r\nx-device: default\r\n\r\n{\r\n "meet": { the non-working one: CompletedProcess(args='curl -i --tlsv1.2 https://api.racing.com/v1/en-au/meet/details/5158194/', returncode=0, stdout=b'HTTP/2 500 \r\naccess-control-allow-headers: content-Type, accept, origin, X-Requested-With, DataServiceVersion, MaxDataServiceVersion\r\naccess-control-allow-methods: PUT, POST, GET, DELETE, MERGE, OPTIONS\r\naccess-control-allow-origin: *\r\n cache-control: no-cache\r\ncontent-type: text/javascript; charset=utf-8\r\nexpires: -1\r\npragma: no-cache\r\nx-aspnet-version: 4.0.30319\r\nx-powered-by: ASP.NET\r\n content-length: 36\r\ndate: Sun, 08 Dec 2019 23:22:35 GMT\r\nx-device: default\r\n\r\n{"Message":"An error has occurred."}' The requests.get() for the two urls both works in the local machine, but the second won't work in google cloud function, means the google server sends the http request differently? or the racing server treats the two url differently?
I reproduced the issue, I found what is the problem, but I wasn't able to solve it (because of my low python skill). I got an error 500 by doing this with curl: curl -i --tlsv1.0 https://api.racing.com/v1/en-au/meet/details/5158194/ It works with --tlsv1.1 and --tlsv1.2. The version of TLS used should be the issue. I tried to force an higher version of requests in the requirements.txt file without change. I added the parameter verify=False to the get request without better results. I'm only at the half way. I hope this help you for going further in your debug. EDIT This morning (12-09-2019), I retried on Cloud Shell, and all tls versions are working: guillaume_blaquiere#cloudshell:~😎 curl -i --tlsv1.0 https://api.racing.com/v1/en-au/meet/details/5158194/ | head HTTP/1.1 200 OK Access-Control-Allow-Headers: content-Type, accept, origin, X-Requested-With, DataServiceVersion, MaxDataServiceVersion Access-Control-Allow-Methods: PUT, POST, GET, DELETE, MERGE, OPTIONS Access-Control-Allow-Origin: * Cache-Control: public, max-age=180 Content-Type: text/javascript; charset=utf-8 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET guillaume_blaquiere#cloudshell:~😎 curl -i --tlsv1.1 https://api.racing.com/v1/en-au/meet/details/5158194/ | head HTTP/1.1 200 OK Access-Control-Allow-Headers: content-Type, accept, origin, X-Requested-With, DataServiceVersion, MaxDataServiceVersion Access-Control-Allow-Methods: PUT, POST, GET, DELETE, MERGE, OPTIONS Access-Control-Allow-Origin: * Cache-Control: public, max-age=180 Content-Type: text/javascript; charset=utf-8 X-AspNet-Version: 4.0.30319 X-Powered-By: ASP.NET guillaume_blaquiere#cloudshell:~😎 curl -i --tlsv1.2 https://api.racing.com/v1/en-au/meet/details/5158194/ | head HTTP/2 200 access-control-allow-headers: content-Type, accept, origin, X-Requested-With, DataServiceVersion, MaxDataServiceVersion access-control-allow-methods: PUT, POST, GET, DELETE, MERGE, OPTIONS access-control-allow-origin: * cache-control: public, max-age=180 content-type: text/javascript; charset=utf-8 x-aspnet-version: 4.0.30319 x-powered-by: ASP.NET guillaume_blaquiere#cloudshell:~😎 curl -i --tlsv1 https://api.racing.com/v1/en-au/meet/details/5158194/ | head HTTP/2 200 access-control-allow-headers: content-Type, accept, origin, X-Requested-With, DataServiceVersion, MaxDataServiceVersion access-control-allow-methods: PUT, POST, GET, DELETE, MERGE, OPTIONS access-control-allow-origin: * cache-control: public, max-age=180 content-type: text/javascript; charset=utf-8 x-aspnet-version: 4.0.30319 x-powered-by: ASP.NET Maybe an update on the API side? My function still returns 500. Not understandable! Anyway, curl and subprocess in Cloud Function aren't recommended, you don't manage the underlying infrastructure (the main principle of serverless) and you don't know what to expect when you use system command.
Final Update: I changed the region of my cloud function, and it worked. Still don't understand why, my guess is the IP address in Asian region is blocked from the server, anyhow we live in a biased world.
Displaying a PNG from a REST API that is not from a URL
I have a REST endpoint that, when I consume it (GET endpoint that requires a few headers), it returns an image, but not a URL. Using Postman, I get a raw response as follows: HTTP/1.1 200 OK Date: Tue, 07 Aug 2018 21:26:33 GMT Server: Apache Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE, HEAD Access-Control-Allow-Credentials: true Access-Control-Allow-Headers: Authorization, Origin, X-c2b-Authorization, X-c2b-mTAN, X-Requested-With, X-c2b-Sender-Id, Content-Type, Accept, Cache-Control Max-Forwards: 20 Via: 3.1 lp10b2wxdpp02 (Some Random Gateway) X-CorrelationID: Id-880e6a5b74d00f00000000008ee4edd1 0 X-Frame-Options: SAMEORIGIN X-NodeID: 02 X-Powered-By: JOY Content-Type: image/png Connection: close Transfer-Encoding: chunked PNG ... I have checked this recipe from the Flutter site: https://flutter.io/cookbook/images/network-image/ However, it assumes that you are passing a URL, which I cannot do given the response. Any ideas? Thanks!
CORS - Chrome canceling simple GET request
I'm trying to set up CORS to work with Socket IO in Node. Unfortunately the request keeps getting cancelled by Chrome: GET https://example.com/zebra/8601/socket.io/1/?key=example123&t=1377831596484 HTTP/1.1 Origin: https://example.io Referer: https://example.io/example User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36 If I open up the URL in a new tab, I get a much nicer response: HTTP/1.1 200 OK Server: nginx/1.4.1 Date: Fri, 30 Aug 2013 03:00:12 GMT Content-Type: text/plain; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive Access-Control-Allow-Origin: * Access-Control-Allow-Credentials: true Access-Control-Allow-Methods: GET, PUT, POST, OPTIONS Access-Control-Allow-Headers: Authorization,Content-Type,Accept,Origin,Referer,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since While it's an actual cross-origin request though, it just fails. The Nginx config is as follows: location ~ ^/zebra/(\d+)(?:/(.*))?$ { add_header Access-Control-Allow-Origin *; add_header Access-Control-Allow-Credentials true; add_header Access-Control-Allow-Methods "GET, PUT, POST, OPTIONS"; add_header Access-Control-Allow-Headers "Authorization,Content-Type,Accept,Origin,Referer,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since"; } How can I configure things to get it working with CORS?
So the solution was to make sure we were configuring this Socket IO setting correctly at the Node JS end: io.configure(function() { io.set('origins', '*:*'); }); .. and then not do anything funky with CORS at the Nginx end, at all. Removing all add_header Access-Control-Allow occurrences from the Nginx config has done the trick.
Cross-domain chunked uploads using CORS
I have user-submitted files that I'm trying to upload in 10 MB chunks. I'm currently using raw XMLHttpRequest (and XDomainRequest) to push each individual slice (File.prototoype.slice) on the front end. The back end is Nginx using the upload module. Just for reference, here's the synopsis of how I'm using slice: element.files[0].slice(...) I understand the cross-browser prefixed methods webkitSlice and mozSlice and all that. The problem I have is with actually making the cross-domain request. I'm uploading from server.local to upload.server.local. In Firefox, the options request goes through fine and then the actual post fails. In Chrome and Opera, the options request fails with OPTIONS https://URL Resource failed to load Here are the headers from Firefox: Request Headers OPTIONS /path/to/asset HTTP/1.1 Host: upload.server.local:8443 User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:18.0) Gecko/20100101 Firefox/18.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Origin: https://server.local:8443 Access-Control-Request-Method: POST Access-Control-Request-Headers: content-disposition,content-type,x-content-range,x-session-id Connection: keep-alive Pragma: no-cache Cache-Control: no-cache Response Headers HTTP/1.1 204 No Content Server: nginx/1.2.6 Date: Wed, 13 Feb 2013 03:27:44 GMT Connection: keep-alive access-control-allow-origin: https://server.local:8443 Access-Control-Allow-Methods: POST, OPTIONS Access-Control-Allow-Headers: x-content-range, origin, content-disposition, x-session-id, content-type, cache-control, pragma, referrer, host access-control-allow-credentials: true Access-Control-Max-Age: 10000 The actual post request never leaves the browser. Nginx access logs never see the post. The browser halts it for some reason. How do I unravel why this post is being blocked? Chromium 24 Firefox 18 Opera 12.14 I've verified all browsers support CORS properly here. By pointing my uploads to https://cors-test.appspot.com/test, I have confirmed that the problem is definitely with the server-side headers.
The POST won't leave the browser if the preflight check does not return sufficient permissions and thus the POST request is not fully authorized. The request/response included in the question does look sufficient to me. Are you sure you are setting withCredentials = true in your XMLHttpRequest? Are you sure that you have valid (not self-signed) SSL certificates on your servers? The HTTPS might fail the CORS check even if you have added an exception for browsing the site with an invalid certificate. Have you tried emptying your cache? You have Access-Control-Max-Age: 10000 set in your response headers. That's close to 3 hours. I know you've been working on this longer than that but while testing especially, set that header to zero instead so you don't go crazy with browser caching of old access permissions. In general I'd start with going as permissive as possible with the CORS headers and slowly ratcheting up the the security to see where it fails. However, this is not completely straightforward. For example, according to the MDN documentation on CORS, When responding to a credentialed request, server must specify a domain, and cannot use wild carding. The above example would fail if the header was wildcarded as: Access-Control-Allow-Origin: * When I send the request part of your question to https://cors-test.appspot.com/test, I get back the following: HTTP/1.1 200 OK Cache-Control: no-cache Access-Control-Allow-Origin: https://server.local:8443 Access-Control-Allow-Headers: content-disposition,content-type,x-content-range,x-session-id Access-Control-Allow-Methods: POST Access-Control-Max-Age: 0 Access-Control-Allow-Credentials: true Cache-Control: no-cache Expires: Fri, 01 Jan 1990 00:00:00 GMT Content-Type: application/json Content-Encoding: gzip Content-Length: 35 Vary: Accept-Encoding Date: Thu, 23 May 2013 06:37:34 GMT Server: Google Frontend So you can start from there and add more and more security until it breaks to figure out what is the culprit.
IE doesn't seem to cache my images
I really hope someone has some ideas. I have set up my web config to cache images for 30 days. web.config: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <staticContent> <clientCache cacheControlCustom="public" cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" /> </staticContent> </system.webServer> </configuration> Yet when I request the page with IE and checkout network traffic this is what I see: Request Header: Key Value Request GET http://www.xx.com/Content/Icons/login.png HTTP/1.1 Accept image/png, image/svg+xml, image/*;q=0.8, */*;q=0.5 Referer http://www.selftestware.com/ Accept-Language en-US User-Agent Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) Accept-Encoding gzip, deflate Host www.xx.com If-Modified-Since Wed, 24 Aug 2011 15:48:10 GMT If-None-Match W/"0195d397562cc1:0" Proxy-Connection Keep-Alive Pragma no-cache Cookie __utma=xx Response: Key Value Response HTTP/1.1 200 OK Cache-Control public,max-age=2592000 Content-Type image/png Last-Modified Wed, 24 Aug 2011 15:48:10 GMT Accept-Ranges bytes ETag W/"0195d397562cc1:0" Server Microsoft-IIS/7.5 X-Powered-By ASP.NET Date Wed, 24 Aug 2011 10:39:14 GMT Content-Length 727 Should it not send a 304 (not modified). I just can't understand what's wrong here.
Your request header was sent a "Pragma: no-cache" which means told the server not to cache this request. That's why your server response HTTP 200 rather than HTTP 304. This "Pragma: no-cache" was sent by the browser. If you press Ctrl+F5 hotkey or configured your browser not to cache anything will cause this result. You can try to create a blank page that contains a link to this cached page, then click the link on it. You'll see this page been cached.