Hi,
Im trying to set the username and password for a URI using the URIBuilder class.
Im using the following code (except with real values for site, user, pword) :
However, an unathorized error occurs at the myResponse line.
When i debug, it appears that the username and password is not set.
can anyone help?
thanks,
danny.
Im trying to set the username and password for a URI using the URIBuilder class.
Im using the following code (except with real values for site, user, pword) :
Code:
Dim i As New UriBuilder()
i.Scheme = "http"
i.Host = "www.site.com"
i.UserName = "user"
i.Password = "pword"
Dim myRequest As WebRequest = WebRequest.Create(i.Uri)
Dim myResponse As WebResponse = myRequest.GetResponse()
However, an unathorized error occurs at the myResponse line.
When i debug, it appears that the username and password is not set.
can anyone help?
thanks,
danny.