Question

I am trying to understand the dialogue flow between my just written webdav client app and an IIS server. Actually, I need to understand it as it does work with https but not with normal http and the servers are configured to accept both.

First, "PROPFIND" seems to work well. The funny thing though is that if I analyze the HTTP traffic with Fiddler, there is a 401 response from the server that my program does not see... I try then the same operation with Windows Mini-redirector and the same happens. There is a 401 response there that does not seem to affect. This is with http.

Then, the next step is to send a file with "PUT" in a HttpWebRequest. My application does not throw any error and does not even get any response, it just waits for it indefinitely, which, to the effect, is like freezing; however, in Fiddler, or other network analyzer, there is a 401 response from the server that my app seems to miss and there is no more traffic after. I try then with mini-redirector and the same 401 is there but there is a following 201 response and the file is uploaded.

All seems to work well with https in my app. I have tried with IIS 6.0 IIS 7 and IIS 8.0. Them all are configured to accept non SSL traffic.

Can someone enlighten me as why is that 401 there that my app does not see? It is also in the traffic with mini-redirector but doesn't seem to bother.

Also, any experience on why it would not work with http, mini-redirector does so the server accepts it, but would work with https?

Was it helpful?

Solution

The remote IIS didn't like the option SendChunked = true. It seems that it does not like unknown sizes. The code with HttpWebRequest method had this option. Without it, it works just fine.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top