Link to home
Start Free TrialLog in
Avatar of jfergy
jfergy

asked on

using MSXML2.ServerXMLHTTP to grab data from same server

I am using a carousel to grab data and show results using ajax. I have a JS Carousel file which calls the URL to get data from and happens to be on the same server as the script.

What I am finding is I have no problems when pulling from a different server. However when grabbing XML data using MSXML2.ServerXMLHTTP and GET request off the same server, it times out and seems to go into an infinate loop. Any ideas here?

So

Proxy.asp File uses MSXML2.ServerXMLHTTP to open a url on my server
Data is parsed in carousel and shown to users.
Avatar of jfergy
jfergy

ASKER

here is the code I am using. again, when I grab data from a different site and server, no issues. When its from the same site, I get problems
<%
  Response.Buffer = True
  Dim objXMLHTTP, xml
  
  myURL = Request("myurl")

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

  ' Opens the connection to the remote server.
  xml.Open "GET", myURL, False
	
  ' Actually Sends the request and returns the data:
  xml.Send

  'Display the HTML both as HTML and as text
  
  Response.Write xml.responseText
  Set xml = Nothing
  
%>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of BigRat
BigRat
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial