I'm trying to use the Webclient class to "POST" to a web site. The website
is using basic authentication. Im getting a "(401) Unauthorized" error.
Here is my basic code:
dim myWebClient as WebClient = New WebClient
myWebClient.Credentials = New NetworkCredential("user", "pass")
bytReturn = myWebClient.UploadData(strURL, bytRequest)
I know the user/pass is correct because I can log on manually to the website.
Jeff Dillon - 08 Nov 2004 21:11 GMT
perhaps "domain\username" or "machinename\username" instead of just
"username"? just guessing...
Also, you should see something in the Event Log.
Jeff
> I'm trying to use the Webclient class to "POST" to a web site. The website
> is using basic authentication. Im getting a "(401) Unauthorized" error.
[quoted text clipped - 5 lines]
>
> I know the user/pass is correct because I can log on manually to the website.