Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Connecting to server using MSXML2.ServerXMLHTTP

Posted on 2010-08-18
2
Medium Priority
?
960 Views
Last Modified: 2013-11-19
My page is connecting to a server to retrieve search results. My code looks like this:

Dim TestString                               
url = "http://sitelife.construction.com/ver1.0/Direct/Jsonp?r={%22Requests%22:[{%22SearchAction%22:{%22NumberPerPage%22:10,%22OnPage%22:1,%22SearchString%22:%22Pennsylvania%22,%22SearchType%22:%22BlogPost%22}}],%22UniqueId%22:0}"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send "" 
TestString = xmlhttp.responseText
'Response.write TestString

set xmlhttp = nothing

This works fine on my personal server, the results are here:
http://www.glowfishtw.com/asp_parse.asp

But when I try to run the same page on the development server at my office I get either the error:

msxml3.dll error '80072efd'
A connection with the server could not be established

or

msxml3.dll error '800c0005'
The system cannot locate the resource specified.

I get these different errors through trying different connection types I change this line:
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")

to one of these

set xmlhttp = Server.CreateObject("Microsoft.XMLHTTP")
set xmlhttp = Server.CreateObject("Msxml2.ServerXMLHTTP.3.0")
set xmlhttp = Server.CreateObject("Msxml2.XMLHTTP.3.0")

none of these work on my development server at the office. SO I don't think it is the version of xmlhttp.

Does anyone have any ideas what might be causing these errors?

I am able to connect to the server using javascript. The following piece of code does work on both servers, but I am unable to duplicate it in asp VBscript.

<script language="JavaScript">
       var requestBatch = new RequestBatch();
       var serverUrl = "http://sitelife.construction.com/ver1.0/Direct/Process";
   
       var searchType = "BlogPost";  // others are Comment, ForumPost, Gallery, Photo, Video
       
       // var searchString = "Title:Pennsylvania";  // To search only the title for Penn
       var searchString = "Pennsylvania";
             
       requestBatch.AddToRequest(new SearchAction(searchType, searchString, 10, 1));
       requestBatch.BeginRequest(serverUrl, clientCallBack);

       function clientCallBack(responseBatch) {
         // console.dir(responseBatch);  // -- use this in Firefox (only) to show the responseBatch object in the console to see what data is available.

       }
   </script>

0
Comment
Question by:elliottbenzle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 2000 total points
ID: 33473250
Sounds like a network issue. The javascript runs on the client, so that would use the client network. Maybe the firewall on the development server does not allow opening that url. To check that: open a remore desktop connection to the development server (or login at in physically) and try to open the url using IE.
0
 
LVL 4

Author Closing Comment

by:elliottbenzle
ID: 33474415
Thank you. I will check it out.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question