I have a solution with several projects, one a web site the other a separate web server. (They will reside on different hosts.) I need to connect to the web service from some javascript in the web site. However, although this seems like an obvious, easy thing, I can't seem to get it right. My web service works fine, I can connect to it from a Windows forms app in a separate project in the same solution. What I have in my aspx file is this:
<asp:ScriptManager ID="ScriptManager1" runat="server">
<Services>
<asp:ServiceReference Path="~/../WebService/WebService.asmx" />
</Services>
</asp:ScriptManager>
<script type="text/javascript">
function calback(result)
{
alert("hello");
}
WebService.FunctionToCall("hello", callback);
</script>
However, the service reference says it can't access .. from ~
Can someone point me in the right direction?