469,282 Members | 2,001 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,282 developers. It's quick & easy.

Error 401: Unauthorized

The following snippet of code is part of a larger module, and the code shown
here is giving me an error. The error is "The remote server returned an
error: (401) Unauthorized." The error occurs on the line 'objResponse =
objRequest.GetResponse()
.................................................. ......................................
Private Function readHtmlPage(ByVal url As String) As String
Dim result As String
Dim objResponse As WebResponse
Dim objRequest As WebRequest = System.Net.HttpWebRequest.Create(url)
objResponse = objRequest.GetResponse(
.................................................. ......................................
Could someone please help me understand why this error is appearing. If
anymore information or clarification is needed, please let me know. Thanks.
Jul 21 '05 #1
3 3924
Is the website you are trying to access using authentication? If so, then
the code you have there will give such an error.
"MrMike" <Mr****@discussions.microsoft.com> wrote in message
news:A8**********************************@microsof t.com...
The following snippet of code is part of a larger module, and the code shown
here is giving me an error. The error is "The remote server returned an
error: (401) Unauthorized." The error occurs on the line 'objResponse =
objRequest.GetResponse()'
.................................................. ......................................
Private Function readHtmlPage(ByVal url As String) As String
Dim result As String
Dim objResponse As WebResponse
Dim objRequest As WebRequest = System.Net.HttpWebRequest.Create(url)
objResponse = objRequest.GetResponse()
.................................................. ......................................
Could someone please help me understand why this error is appearing. If
anymore information or clarification is needed, please let me know. Thanks.
Jul 21 '05 #2
Yes, the application requires Windows authentication. I have full control of
the application, and am able to perform all other functions within the
application. How would I go about correcting this specific problem and
specifying the proper credentials during this process? Thanks.

"Lance Wynn" wrote:
Is the website you are trying to access using authentication? If so, then
the code you have there will give such an error.
"MrMike" <Mr****@discussions.microsoft.com> wrote in message
news:A8**********************************@microsof t.com...
The following snippet of code is part of a larger module, and the code shown
here is giving me an error. The error is "The remote server returned an
error: (401) Unauthorized." The error occurs on the line 'objResponse =
objRequest.GetResponse()'
.................................................. ......................................
Private Function readHtmlPage(ByVal url As String) As String
Dim result As String
Dim objResponse As WebResponse
Dim objRequest As WebRequest = System.Net.HttpWebRequest.Create(url)
objResponse = objRequest.GetResponse()
.................................................. ......................................
Could someone please help me understand why this error is appearing. If
anymore information or clarification is needed, please let me know. Thanks.

Jul 21 '05 #3
this might hep you out a bit.

http://msdn.microsoft.com/library/de...icatetopic.asp
"MrMike" <Mr****@discussions.microsoft.com> wrote in message
news:F6**********************************@microsof t.com...
Yes, the application requires Windows authentication. I have full control
of
the application, and am able to perform all other functions within the
application. How would I go about correcting this specific problem and
specifying the proper credentials during this process? Thanks.

"Lance Wynn" wrote:
Is the website you are trying to access using authentication? If so, then
the code you have there will give such an error.
"MrMike" <Mr****@discussions.microsoft.com> wrote in message
news:A8**********************************@microsof t.com...
The following snippet of code is part of a larger module, and the code
shown
here is giving me an error. The error is "The remote server returned an
error: (401) Unauthorized." The error occurs on the line 'objResponse =
objRequest.GetResponse()'
.................................................. ......................................
Private Function readHtmlPage(ByVal url As String) As String
Dim result As String
Dim objResponse As WebResponse
Dim objRequest As WebRequest =
System.Net.HttpWebRequest.Create(url)
objResponse = objRequest.GetResponse()
.................................................. ......................................
Could someone please help me understand why this error is appearing. If
anymore information or clarification is needed, please let me know.
Thanks.

Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Andrew | last post: by
1 post views Thread by ag | last post: by
reply views Thread by Francois Guerin | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.