I am develop a website,which using PageMethods, in vs development server, it can fire, but not in local iis server(got 500 error and timeout in firebug),how do i debug? this is a popup window, in call, i get the parent window's url,use pagemethod to get calling number by url, the fire call.
<script type="text/javascript">
function call() {
var location = null;
if (window.opener != null) {
location = window.opener.location.href;
}
else {
location = "-1";
}
var called = document.getElementById('<%=txtCalled.ClientID%>').value;
location = location + "|" + called;
alert(location);
PageMethods.StartCall(location, onSucess, FindResultTimeout, FindResultError, null, 10000);
}
function onSucess(phone) {
alert(phone);
}
function FindResultTimeout() {
alert('timeout');
}
function FindResultError(result, response) {
alert(response.get_statusCode());
}
</script>
call mehtod:
<a href="javascript:call();">call</a>
codebehind method:
[WebMethod]
public static string StartCall(string referer)
{
var paras = referer.Split('|');
string calling = GetNumberByDomain(paras[0]);
addLog(paras[0], paras[1]);
return clickToDial(calling, paras[1]);
}