Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / November 2004

Tip: Looking for answers? Try searching our database.

Im getting a "(401) Unauthorized" error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CLEAR-RCIC - 08 Nov 2004 14:17 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.