Trying to download file in code.
Current code:
Dim uri As New UriBuilder
uri.UserName = \"xxx\"
uri.Password = \"xxx\"
uri.Host = \"x
With UWP, this has become a more pertinent question as UWP does not have a WebClient
. The correct answer to this question is if you are being re-directed to the login page, then there must be an issue with your credentials OR the setting (or lack of) header for the HttpWebRequest
.
According to Microsoft, the request for downloading is sent with the call to GetResponse()
on the HttpWebRequest
, therefore the downloaded file SHOULD be in the stream in the response (returned by the GetResponse()
call mentioned above).