Forum Discussion

chicks's avatar
chicks
Regular Contributor
9 years ago
Solved

ActiveXObject "Download of the specified resource has failed"

This code (Javascript) is working in one environment (QA) but not in another environment (Staging) .

It was previously working in both environments.  It works manually in both environments.

 

The  error indication TestComplete gives me is

msxml3.dll

 

with additional info "The download of the specified resource has failed."  referring to the highlighted line below.

 

Is there some way TestComplete can provide additional information  as to the actual error ?

 

Is there any way to get more information out of the activeXobject ?

 

==========================================================

function generic_http_request ( URL, method, formData) {

 

anAccessToken = EMPTY;

var XmlHttpRequest;

Log.Message( "URL is " + URL);

 

XmlHttpRequest = null;

XmlHttpRequest = new ActiveXObject("MSXML2.XMLHTTP.3.0");

 

if ( ( method == undefined) || (method == "") ) {

method = "GET";

}

 

// XmlHttpRequest.open( Method, URL, Asynchronous, UserName, Password)

// method e.g. GET, POST, HEAD, PUT, DELETE, OPTIONS...

// Asynchronous = true, do not wait on a server response, false, pause current execution utnil the request is complete

XmlHttpRequest.open(method, URL, false);

// Name, Value

XmlHttpRequest.setRequestHeader("Content-Type", "application/json");

XmlHttpRequest.setRequestHeader("access_token", anAccessToken);

XmlHttpRequest.send(formData);

try {

Log.Message("http_request: reply in additional info", XmlHttpRequest.responseText);

return XmlHttpRequest.responseText;

}

catch (e) {

return "Error" + e ;

}

}

 

 

 

  • This is now working when I use MSXML2.ServerXMLHTTP.3.0 instead after googling "msxml3.dll download of the specified resource failed".  

     

    Credit to AnthonyWJones at stackoverflow

     

    op using Microsoft.XMLHTTP, you should not be using that in a service base scenario. Instead use MSXML2.SServerXMLHTTP.3.0 which is designed for use in services

1 Reply

  • chicks's avatar
    chicks
    Regular Contributor

    This is now working when I use MSXML2.ServerXMLHTTP.3.0 instead after googling "msxml3.dll download of the specified resource failed".  

     

    Credit to AnthonyWJones at stackoverflow

     

    op using Microsoft.XMLHTTP, you should not be using that in a service base scenario. Instead use MSXML2.SServerXMLHTTP.3.0 which is designed for use in services