• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 578
  • Last Modified:

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?


Proxy.asp File uses MSXML2.ServerXMLHTTP to open a url on my server
Data is parsed in carousel and shown to users.
1 Solution
jfergyAuthor Commented:
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:

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

Open in new window

What exactly is the URL you are using when accessing the same machine. I have seen DNS servers translate localhost into www.localhost.de (yes, there IS such a site). Try using instead of localhost or any other name.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now