Read/retrieve Page content from benind proxy server (ASP Classic)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jeremy450
    New Member
    • Jan 2012
    • 6

    Read/retrieve Page content from benind proxy server (ASP Classic)

    Hi there

    Want to know if its possible to Read/retrieve Page content from behind proxy server?

    what i mean is this.
    i have a server that sites at a corp business. and to get onto the internet u need proxy authentication.

    i want to know if i can do this:
    1.User accesses asp script on intranet.
    2.page runs code.
    3.code then authenticates with the proxy server.
    4.goes through internet to website.
    5.retrieves data from site.
    6.shows retrieved data on user's screen

    Can anyone help?

    thanks in advance
    Regards
    Jeremy
  • Nicodemas
    Recognized Expert New Member
    • Nov 2007
    • 164

    #2
    Use the XMLHTTP object.

    Code:
    set obj = server.createObject("msxml2.serverxmlhttp")
    [B]obj.setProxyCredentials "username", "password"[/B]
    obj.open "GET", "URL", false
    obj.send ""
    
    response.write obj.responseText

    Comment

    • jeremy450
      New Member
      • Jan 2012
      • 6

      #3
      Originally posted by Nicodemas
      Use the XMLHTTP object.

      Code:
      set obj = server.createObject("msxml2.serverxmlhttp")
      [B]obj.setProxyCredentials "username", "password"[/B]
      obj.open "GET", "URL", false
      obj.send ""
      
      response.write obj.responseText
      Hi Nicodemas

      what about the proxy server address?

      Regards

      jeremy

      Comment

      • Nicodemas
        Recognized Expert New Member
        • Nov 2007
        • 164

        #4
        I'm not sure I understand your question. What about it? If all external traffic from the web server exits your intranet through the proxy, then why would you need to explicitly state the proxy address?

        Comment

        • jeremy450
          New Member
          • Jan 2012
          • 6

          #5
          Because the proxy has to be manually entered into the browsers. if you dont set it it wont detect unless you set the browser to auto detect.

          the corporation routes all their internet traffic to a central place like over 1500miles away.

          trying to set a way so that when people go to the page they wont need to be asked for their username and password to get the external data

          Comment

          • Nicodemas
            Recognized Expert New Member
            • Nov 2007
            • 164

            #6
            I suspect its a server configuration. Please ask that question on the Windows Forum, as it does not apply to this programming forum.

            Comment

            • jeremy450
              New Member
              • Jan 2012
              • 6

              #7
              it isnt a server configuration. as its a asp codeing to get through the proxy server and outside

              Comment

              • Nicodemas
                Recognized Expert New Member
                • Nov 2007
                • 164

                #8
                ASP code cannot control network topography or routing.

                Comment

                • jeremy450
                  New Member
                  • Jan 2012
                  • 6

                  #9
                  thats all you had to say.

                  Comment

                  Working...