[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

close MSXML2.ServerXMLHTTP.3.0  object asp

Posted on 2009-07-15
1
Medium Priority
?
3,166 Views
Last Modified: 2012-05-07
Hi , I am using ajax in classic asp. I would like to close the object of type MSXML2.ServerXMLHTTP.3.0 .


Set objXmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
objXmlHttp.open "GET", strUrl, false, "user", "123"
objXmlHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
objXmlHttp.send()

if objXmlHttp.status = 200 Then
      Set responseXML = CreateObject("Msxml2.DOMDocument.3.0")
       Response.ContentType = "text/xml"
       Response.CharSet = "UTF-8"
         responseXML.async = False
       responseXML.load objXmlHttp.responseStream
       responseXML.save Response
      else
      Response.write objXmlHttp.status
      
end if
0
Comment
Question by:Saroj13
[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
1 Comment
 
LVL 82

Accepted Solution

by:
hielo earned 2000 total points
ID: 24875581
There is no close() method. If the request is taking too long and you don't want to wait for it to complete, use the abort() method (but this you use only if you are making an asynchronous call. This does NOT apply to you since you are making a synchronous call).

If you are trying to release/free resources, make sure you set the object to nothing once you are done.

Set objXmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0")
objXmlHttp.open "GET", strUrl, false, "user", "123"
objXmlHttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
objXmlHttp.send()
 
if objXmlHttp.status = 200 Then
      Set responseXML = Server.CreateObject("Msxml2.DOMDocument.3.0")
       Response.ContentType = "text/xml"
       Response.CharSet = "UTF-8"
         responseXML.async = False
       responseXML.load objXmlHttp.responseStream
       responseXML.save Response
else
      Response.write objXmlHttp.status
      
end if
Set objXmlHttp=Nothing

Open in new window

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

649 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