I am trying to create a program which interfaces with a HTTP page which needs basic authentication. I have created the basic web browser controls etc but have not been able to get the authentication working.
I have the idea that I could "handshake" with the site first before entering the username and password as an ICredential. Does this sound possible? The code I have is below:
Dim request As System.Net.HttpWebRequest
request = System.Net.HttpWebRequest.Create(WebAddress)
request.Credentials = (New System.Net.NetworkCredential("username", "password"))
The above doesn't seem to work, giving me a 401 error and URL malformed exception. ( My url is an IP address eg http://10.1.1.1/ )
Does anyone have any idea how to do this? Help! :)
View Complete Post