View Full Version : objXMLHTTP

10-20-2003, 03:59 PM
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.ServerVariables("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:

'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

10-21-2003, 02:07 PM
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.

10-22-2003, 01:40 AM
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.