Re: Error 401: Unauthorized

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Lance Wynn (lance_wynn_at_N.O.S.P.A.M.hotmail.com)
Date: 01/19/05


Date: Wed, 19 Jan 2005 09:11:31 -0700

this might hep you out a bit.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemnetwebrequestclasspreauthenticatetopic.asp

"MrMike" <MrMike@discussions.microsoft.com> wrote in message
news:F661D25F-0937-4CE1-B810-0AD6E627D1AB@microsoft.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" <MrMike@discussions.microsoft.com> wrote in message
> news:A8F1DA09-9AA9-4ADE-8056-461008276342@microsoft.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.
>
>
>



Relevant Pages

  • Re: Error 401: Unauthorized
    ... the application requires Windows authentication. ... I have full control of ... > The following snippet of code is part of a larger module, ... > Private Function readHtmlPage(ByVal url As String) As String ...
    (microsoft.public.dotnet.general)
  • Re: Modify function (CurrentDb.QueryDefs)
    ... > of their control names are exactly 4 characters). ... > Private Function FieldName(CtlName As String) As String ... > Private Sub A1Q1_Click ... >> Private Function FieldNameas String ...
    (microsoft.public.access.formscoding)
  • Re: Reference a variable with another variable
    ... > Private Function fnHyperLinkOnCurrent(ctlTxtBox As ... > Control, ctlHyperLink As Control, strVariable As String) ...
    (microsoft.public.access.modulesdaovba)
  • Re: Excaping recursive functions
    ... Private Function ControlName(ByVal parentCtr As Control, ... ByVal NameString As String) As Control ...
    (microsoft.public.dotnet.languages.vb)
  • Re: CreateEventProc error
    ... Private Sub BuildDisplayForm(strPath As String, ... Dim qdf As QueryDef, qdfControls As QueryDef ... Dim ctl As Control, ctlLabel As Control, ctlParent As Control ... Dim strFilter As String, strSuffix As String, strParentName As String, ...
    (microsoft.public.access.forms)