472,139 Members | 1,412 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

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 4025
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
reply views Thread by leo001 | last post: by

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.