ServerXMLHTTP - invalid response
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: ServerXMLHTTP - invalid response

  1. #1
    Join Date
    Jan 2003
    Location
    Ohio
    Posts
    31

    ServerXMLHTTP - invalid response

    Getting "the server returned an invalid or unrecognized response" error on the code listed below.
    The url is an asp page on my company's qa server that takes an
    xml request, processes it and returns an xml response. The code works fine
    at work when run from my win 2000 machine on our LAN but one of our clients
    is complaining about the above error, he's using a win xp machine. I can
    reproduce the error if I take the code home and run it from my xp machine
    but I'm not a web developer so I haven't got a clue how to make it work.
    I searched msdn and found a few items regarding the above error, most of it
    I didn't understand - stuff about proxies - but some of it suggested different
    IE security settings which I tried to no avail.

    Any advice would be appreciated ...

    Code:
       var SXH_OPTION_IGNORE_SERVER_SSL_CERT_ERROR_FLAGS = 2;
    	var SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS = 13056;
    	
    	//declare some vars
    	var url = "someurl.asp";
    	var oXmlHttp = new ActiveXObject("Msxml2.ServerXMLHTTP.4.0");
    	var domReq = new ActiveXObject("Msxml2.DOMDocument.4.0");
    	
    	//load the request
    	domReq.async = false;
    	domReq.loadXML(document.getElementById("req").value);
    
    	//set-up for posting data
    	oXmlHttp.open("POST", url);
    	oXmlHttp.setOption(SXH_OPTION_IGNORE_SERVER_SSL_CERT_ERROR_FLAGS,SXH_SERVER_CERT_IGNORE_ALL_SERVER_ERRORS);
    	oXmlHttp.setTimeouts(30000, 30000, 30000, 90000);
    	
    	//send the request
    	oXmlHttp.send(domReq);  // Get error here
    Thanks
    hiccup

  2. #2
    Join Date
    Jan 2003
    Location
    Ohio
    Posts
    31

    Re: ServerXMLHTTP - invalid response

    I found a workaround...
    I replaced Msxml2.ServerXMLHTTP.4.0 with Msxml2.XMLHTTP.4.0.
    (and got rid of the calls to setOption() and setTimeouts because they
    are not supported by Msxml2.XMLHTTP.4.0)

    Thanks for all your help anyway,

    Andy
    hiccup

  3. #3
    Join Date
    Oct 2008
    Posts
    1

    Re: ServerXMLHTTP - invalid response

    Quote Originally Posted by hiccup
    I found a workaround...
    I replaced Msxml2.ServerXMLHTTP.4.0 with Msxml2.XMLHTTP.4.0.
    (and got rid of the calls to setOption() and setTimeouts because they
    are not supported by Msxml2.XMLHTTP.4.0)

    Thanks for all your help anyway,

    Andy
    That's a great fix. It worked for me. It also fixed the following error.

    '800c000e' A security problem occurred

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center