aspdotnet_website_programming thread: 401 unauthorised / Too many redirections attempts in HTTPS file Request
I need a help to get HTTPS file in internet. I have Username and Password.
I can able to get that file directly with the Username and PWD thro.
internet Browser. But I get an error 401(unauthorised) and sometimes ..
too many redirection attempts .. with the following code
Can anyone help me how to solve this problem?..
' Initialize the WebRequest.
Dim myRequest As WebRequest = WebRequest.Create("URL")
Dim cr As New NetworkCredential("User","Pwd")
myRequest.Credentials = cr
myRequest.ContentType = "application/x-www-form-urlencoded"
' Return the response.
Dim myResponse As WebResponse = myRequest.GetResponse()
' Close the response to free resources.
Thanks in advance,