Unable to call asmx web service by jquery Ajax
<p>i am running asmx service in one port localhost:5739 and trying to call the service from other port or plain html + jquery out of the project </p>

<p>but i am unable to access the web service </p>

<p>my webservice is </p>

<pre><code> [WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public string HelloWorld(string text) {
    return "Hello World" + text;
}
</code></pre>

<p>and my code to invoke webservice is </p>

<pre><code>            $.ajax(
            {
                type: "POST",
                url: "http://localhost:5739/asmxservices/testservice.asmx/HelloWorld",
                data: '{ "text": "Kartheek"}',                    
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: OnSuccess,
                error: OnError

            });

            function OnSuccess(data, status) {
                alert(data.d);

            };
            function OnError(msg) {
                alert('error = ' + msg.d);
            }
</code></pre>
