HttpWebRequest fails where WinINet functions succeed
-
I have an app which communicates with a SharePoint server, and one of the things it does is uploads files to the SharePoint server using a HttpWebRequest. However I have found that this doesn't work when the file being uploaded is bigger than about 2mb and either of the following conditions apply - The user is at home and is using VPN to connect to the newtwork - The server is hosted on an ordinary broadband connection The request throws an exception saying 401, unauthorized. Using Fiddler to examine the http request going back and forth, I found that the exception is somewhat incorrect, and is actually referring to the first request of a pair (the first doesn't supply username/password, server asks for authorization, the second supplies the username/password). What has actually happened is that the server has just closed the connection and no reason is supplied as far as I can tell. It *might* even be a gateway timeout, but I very rarely even get a reply from the server under these conditions Using a Win32 app I have for testing things like this, I found that WinINet has no problems putting the file onto the server. I'm a little baffled as to what is happening here. Has anyone else had something like this or have any solutions? Dave