Click to See Complete Forum and Search --> : Need help about using XMLHTTP


liwca
05-01-2003, 12:39 AM
Hi there:

I am trying to use XMLHTTP to develop a simple platform independent application. It's a html file that sends a xml search string to a web server, gets returned search results and show the results.

My code to use XMLHTTP:
----------
//send a search key and get back search results
var xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
xmlHttp.open("POST", url, false);
xmlHttp.setRequestHeader ("MessageType", "Call");
xmlHttp.setRequestHeader ("Content-Type", "text/xml");
xmlHttp.send(strSearch);

var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async= "false";
xmlDoc.loadXML (xmlHttp.responseText);

//display search results using xmlDoc
......

code Note:
------------
url: a string of server url, such as http://www.google.com/api
strSearch: a xml string containing a user entered search key

My problem:
--------------
The file works well from my local machine. I can successfully run the file in IIS folder or any other folders of my computer. However, when I upload the file into a remote server, there is always an access deny error. The error message is "Line 64, Error: Access deny". The error line is the first line of my above code. That is to create a XMLHTTP object. I searched W3C and MSN about the use of XMLHTTP, and found that both IE5+ and Netscap6 support the com. I can't figour out what's wrong.

Can anybody help me to make it streight? Thanks in advance.

Lee

khalidali63
05-01-2003, 08:39 AM
I came accross the same problem,adn never I got any response back from the MSN forums,only one guy said that I need to run

" Proxycfg.exe "

to update the proxy setings,my problem now is that I don't know where to get that software,I can not find it on windows site for general downloads,you may have better luck..let me know if you do.