Note that there are some explanatory texts on larger screens.

plurals
  1. POweb service works javascript but not .net - "unable to connect/actively refused"
    text
    copied!<p>calling web service from asp.net 2.0 and getting "unable to connect to the remote server"/"No connection could be made because the target machine actively refused it" error. it works with a simple html page and javascript but not in .net</p> <p>javascript (works):</p> <pre><code>var soapEnv = "&lt;soapenv:Envelope " + " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' " + " xmlns:xsd='http://www.w3.org/2001/XMLSchema' " + " xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' " + " xmlns:urn='urn:TBEDispatcherAPI'&gt; " + " &lt;soapenv:Header/&gt; " + " &lt;soapenv:Body&gt; " + " &lt;urn:getURL soapenv:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'&gt; " + " &lt;orgCode xsi:type='xsd:string'&gt;" + CODE + "&lt;/orgCode&gt; " + " &lt;/urn:getURL&gt; " + " &lt;/soapenv:Body&gt; " + "&lt;/soapenv:Envelope&gt; "; xmlDoc = new ActiveXObject("Microsoft.XMLHTTP"); xmlDoc.onreadystatechange = process ; xmlDoc.open( "POST", URL, true ); xmlDoc.setRequestHeader("Content-Type", "text/xml; charset=\"utf-8\""); xmlDoc.setRequestHeader("SOAPAction", '""'); xmlDoc.send(soapEnv); </code></pre> <p>.net:</p> <pre><code>DispatcherAPI.DispatcherAPIService dispatcher = new DispatcherAPI.DispatcherAPIService(); dispatcher.Url = URL; string otherURL = dispatcher.getURL(CODE); </code></pre> <p>id guess one of the values set in the javascript version - soapaction, content-type, method - isnt set in the .net version but i really dont know what or how. also may be a different port used by .net ? no idea</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload