C
Cliff
I'm not that great with ASP but I've hacked together a simple server
side script that uses the Microsoft XML ServerXMLHTTP object. The
problem is that when other people use the script sometimes they get an
error that the object can not be created, due likely to the required
Microsoft XML libraries not being installed. I'd like to try creating
the XMLHTTP object in an if/else block so that if the object can not be
created then it tries another object creation approach... here is the
code I'm using to create the object:
var objSrvHTTP=Server.CreateObject("MSXML2.ServerXMLHTTP.4.0");
The above line often fails because the object doesn't exist so I would
like to trap the error and try to create the object like:
var objSrvHTTP=Server.CreateObject("MSXML2.ServerXMLHTTP");
Can someone provide me with the code snippet that will result in the
variable objSrvHTTP having a ServerXMLHTTP object inside that works?
Also, if there are other variations on that object name then please
include those objects as well...
FYI, I'm only using open, setRequestHeader, send and responseText
methods on the object.
Thanks,
Cliff.
side script that uses the Microsoft XML ServerXMLHTTP object. The
problem is that when other people use the script sometimes they get an
error that the object can not be created, due likely to the required
Microsoft XML libraries not being installed. I'd like to try creating
the XMLHTTP object in an if/else block so that if the object can not be
created then it tries another object creation approach... here is the
code I'm using to create the object:
var objSrvHTTP=Server.CreateObject("MSXML2.ServerXMLHTTP.4.0");
The above line often fails because the object doesn't exist so I would
like to trap the error and try to create the object like:
var objSrvHTTP=Server.CreateObject("MSXML2.ServerXMLHTTP");
Can someone provide me with the code snippet that will result in the
variable objSrvHTTP having a ServerXMLHTTP object inside that works?
Also, if there are other variations on that object name then please
include those objects as well...
FYI, I'm only using open, setRequestHeader, send and responseText
methods on the object.
Thanks,
Cliff.