473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Im getting a "(401) Unauthorized" error

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.
Nov 22 '05 #1
1 1770
perhaps "domain\username" or "machinename\username" instead of just
"username"? just guessing...

Also, you should see something in the Event Log.

Jeff
"CLEAR-RCIC" <CL*******@discussions.microsoft.com> wrote in message
news:FF**********************************@microsof t.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.
Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: CLEAR-RCIC | last post by:
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...
1
by: ag | last post by:
Hi guys.. need your help. We have abc.asp page on the source server which calls a .net component on that server. The component is in MTS running under say "domain2\id1" identity. The component...
4
by: Sanjay | last post by:
I have written a web service to return information from the database. This works and the data is returned in XML format from the database and displayed on the web page as well when this web service...
1
by: twnety0ne | last post by:
Hey guys, I am trying to connect to my webite(hosted on a different server) and get some data from a page, but I am getting the 401 (Unauthorized) error. I tried different things like sending...
0
by: Kyle Baley | last post by:
I'm developing an MCMS web service and am getting a 401 unauthorized error when I try to consume it from a client. It works fine when I use the test harness to navigate to the asmx file directly....
0
by: Daatmor | last post by:
Hi, I've worte a program that will grab the html file content from web server. It's work ...
0
by: Shree | last post by:
While invoking the web service from client, I am setting the credentitals using the following code... ReportingService.Credentials = System.Net.CredentialCache.DefaultCredentials; But in...
0
by: =?Utf-8?B?R2VvcmdlIFNodWk=?= | last post by:
I have a folder structure such like this. A ---A1 -----a1.aspx ---A2 A1 and A2 are the subfolder of A. And under the A1 folder, it contains one aspx file named a1.aspx. I set the IIS virtual...
0
by: RSH | last post by:
Hi, I am trying to access a reporting services report using the HTTPWebRequest object but I am getting an error: The remote server returned an error: (401) Unauthorized. We can't seem to figure...
11
by: jjw92 | last post by:
I've been banging my head against the wall with this one for a couple days so I'm hoping someone has some ideas. I have a web service that I created that is called by a .NET class library (which in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.