Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XMLHTTP with IP vs. DNS name

Status
Not open for further replies.

travisbrown

Technical User
Dec 31, 2001
1,016
So I think this is odd. Anyone else concur, or have a solution?

I have an intranet site with integrate Windows Auth on.

If I pass in a qualified url to the MSXML call using the dns name, it's fine.
If I pass in a qualified url to the MSXML call using the ip, I get this message:

msxml3.dll error '80072eef'
The login request was denied

The reason it's and issue is I'd usually use request.servervariables("http_host") as a variable prefix for the script names for portability. The environments don't always have a DNS name.

Code:
url = "[URL unfurl="true"]http://192.168.0.105:8040/test.asp"[/URL] 'fails
url = "[URL unfurl="true"]http://servername:8040/test.asp"[/URL] 'succeeds

'url = "[URL unfurl="true"]http://"[/URL] & request.servervariables("http_host") & "/test.asp" 'pass or fail based on actual url root.

response.write XMLHTTP(url,params,"testuser","testpassword")

FUNCTION XMLHTTP(url,params,username,password)
	IF url <> "" THEN
	  Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP")
	  xml.Open "GET", url & params, False,username,password
	  xml.Send
	  XMLHTTP = xml.responseText
	  Set xml = Nothing
	 ELSE
	 	XMLHTTP = "Error! No destination."
	END IF
END FUNCTION
 
Do both URLS work if you paste them into the address bar of your web browser?
 
Specify at least version 4.0 with version-dependent progid.
[tt] Set xml = Server.CreateObject("MSXML2.ServerXMLHTTP[red].4.0[/red]") 'testing up 5.0 and 6.0[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top