Re: Im getting a "(401) Unauthorized" error

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Jeff Dillon (jeff_at_removeemergencyreporting.com)
Date: 11/08/04


Date: Mon, 8 Nov 2004 13:11:03 -0800

perhaps "domain\username" or "machinename\username" instead of just
"username"? just guessing...

Also, you should see something in the Event Log.

Jeff
"CLEAR-RCIC" <CLEARRCIC@discussions.microsoft.com> wrote in message
news:FF8E3890-2253-434B-8FD3-A91E70BECB52@microsoft.com...
> 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.



Relevant Pages

  • Re: WebProxy with System.Net.WebClient
    ... > i m trying to get html from a website using asp.net. ... > following code to access html of a website. ... WebClient does not expose a Proxy property like ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Download from web
    ... Dim Client As WebClient = New WebClient ... imageUrl = http://www.websíte.com/image.jpg ... Client.DownloadFile(imageUrl, dest) ... This works fine but the website returns a defaultimage if the image is ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Download from web
    ... Dim Client As WebClient = New WebClient ... This works fine but the website returns a defaultimage if the image is ... but has an static file name of something like .. ...
    (microsoft.public.dotnet.languages.vb)
  • Webclient
    ... can anybody explain to me the difference between webclient and ... aren't they doing samething? ... I have a website, and I need to programmatically find out all the ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Auto shut off
    ... What should I look for in event log? ... I notice that when I use intenet to surf the website and auto shut off has higher frequency. ...
    (microsoft.public.windowsxp.general)