The remote server returned an error: (401) Unauthorized. PLEASE HELP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • johnlim20088
    New Member
    • Jan 2007
    • 74

    The remote server returned an error: (401) Unauthorized. PLEASE HELP

    Hi SOMEONE PLEASE HELP ME

    I have a vb net program to call localhost http://localhost/hi.aspx,
    my page work FINE when I browse it, but
    when I call it through vb net program

    it return error

    The remote server returned an error: (401) Unauthorized.

    please help

    following are my code

    ALSO can someone familiar with C# Net, convert it for me to C#>?


    '// SEND TO URL
    SURL = http://localhost/hi.aspx


    HTTP_REQUEST = CType(WebReques t.Create(SURL), HttpWebRequest)
    HTTP_REQUEST.Ke epAlive = True
    'FreeBound()
    HTTP_RESPONSE = HTTP_REQUEST.Ge tResponse

    HTTP_RESPONSE = Nothing
    HTTP_REQUEST = Nothing
  • deepusurana
    New Member
    • Mar 2007
    • 5

    #2
    Hi,
    What is the authentication mode?
    and also check in the IIS Manager that the Internet guest account / asp new worker process has the rights to access it , as when the application runs the asp worker process access it.

    Gud Luck.

    Deepak Surana

    Comment

    • johnlim20088
      New Member
      • Jan 2007
      • 74

      #3
      Please Help,

      What mean bu authentitation mode?
      where to check?

      Can you provide me the step?
      the problem still alive.


      Originally posted by deepusurana
      Hi,
      What is the authentication mode?
      and also check in the IIS Manager that the Internet guest account / asp new worker process has the rights to access it , as when the application runs the asp worker process access it.

      Gud Luck.

      Deepak Surana

      Comment

      • mukeshk
        New Member
        • Mar 2007
        • 4

        #4
        i think you have to create a proxy class object, set the proxy server ip and userid/password if required and assign it to the httpwebrequest class. hope it will work.

        Mk

        Comment

        • johnlim20088
          New Member
          • Jan 2007
          • 74

          #5
          On thank you...

          by the way, where I can get the proxy server ip and userid/password?
          get from my local pc? or need ask network specialist?


          Originally posted by mukeshk
          i think you have to create a proxy class object, set the proxy server ip and userid/password if required and assign it to the httpwebrequest class. hope it will work.

          Mk

          Comment

          • johnlim20088
            New Member
            • Jan 2007
            • 74

            #6
            Hi

            Thank, it is work fine now,
            well, I didnt use proxy

            I just assign default logon to credentials...

            I don't know WHY

            Some computer Need,

            Some No need

            WHY?


            Originally posted by mukeshk
            i think you have to create a proxy class object, set the proxy server ip and userid/password if required and assign it to the httpwebrequest class. hope it will work.

            Mk

            Comment

            Working...