Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: objXMLHTTP

  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    156
    Thanks
    0
    Thanked 0 Times in 0 Posts

    objXMLHTTP

    I have a asp page. After executing all the value I want to print the view sourse of the same page at bottom.

    Now for the same I am using below mentioned code the end which i got from 4guysfromrolla. But it is giving me an eoor

    The gateway could not retrieve the requested page.

    HTTP 407 Proxy Authentication Required - The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. (12209)

    if anybody know about this code pls. help me or if anybody has diffrent idea to solve my basic query letme know.

    <%
    Dim objXMLHTTP, xml

    thisurl = "http://"&Request.ServerVariables("remote_addr")&":"&Request.ServerVariables("server_port")&Request.ServerVa riables("URL")

    ' Create an xmlhttp object:
    Set xml = Server.CreateObject("Microsoft.XMLHTTP")
    ' Or, for version 3.0 of XMLHTTP, use:
    ' Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")

    ' Opens the connection to the remote server.
    xml.Open "GET", thisurl, False

    ' Actually Sends the request and returns the data:
    xml.Send

    'Display the HTML both as HTML and as text
    Response.Write "<h1>The HTML text</h1><xmp>"
    Response.Write xml.responseText
    Response.Write "</xmp><p><hr><p><h1>The HTML Output</h1>"

    Response.Write xml.responseText

    Set xml = Nothing
    %>

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,950
    Thanks
    0
    Thanked 236 Times in 233 Posts
    You are passing through a proxy that requires authentication.
    The complete syntax for Open method is this:

    HttpRequest.open(Method, URL, Async, User, Password)

    where User and Password are obviously used for authentication process. So try specifying the username and password.

  • #3
    Regular Coder
    Join Date
    Oct 2003
    Location
    London, UK
    Posts
    411
    Thanks
    0
    Thanked 1 Time in 1 Post
    Actually, those user/pass parameters are intended to be used for "Basic Authentication" with the web server, not the proxy. However, seeing as it's an ISA proxy, it might just work - it *appears* to use "Basic Authentication" too.

    (In case anyone was wondering, the PROXYCFG.EXE tool won't help in this instance)

    Please post back to let us know either way!

    If not, try setting up the machines so that Windows Integrated Authentication is used instead, which will bypass this problem entirely.
    Last edited by M@rco; 10-22-2003 at 12:49 AM.
    Marcus Tucker / www / blog
    Web Analyst Programmer / Voted SPF "ASP Guru"


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •