i have webmethod:
/// <summary> /// check if user name valid /// </summary> /// <param name="username"></param> /// <param name="userpassword"></param> /// <returns></returns> [webmethod] public static object loguser(string username, string userpassword) { try { return new bll.login().loguser(username, userpassword); } catch { return false; } } that called in .js
function loguser() { var username = document.getelementbyid('txt_usr').value; var userpassword = document.getelementbyid('txt_pass').value; // validations if (username == "") { alert("falta informar el nombre del usuario"); return; } if (userpassword == "") { alert("falta informar el password del usuario"); return; } pagemethods.loguser(username, userpassword, onsucess, onerror); function onsucess(result) { if (result == false) { alert("el usuario o contraseƱa incorrecto"); } else { alert("true"); windows.location.href = 'list.aspx'; } alert('sucess'); } function onerror(error) { alert("error: " + error.get_message() + "; " + "stack trace: " + error.get_stacktrace() + "; " + "status code: " + error.get_statuscode() + "; " + "exception type: " + error.get_exceptiontype() + "; " + "timed out: " + error.get_timedout()); windows.location.href = 'errormanipulation.aspx'; } }
with web.config
<configuration> <system.web> <compilation debug="true" targetframework="4.0" /> <httpruntime executiontimeout="3600" maxrequestlength="2147483647" /> </system.web></configuration> the problem i'm getting 90% of time, return in onerror, when debug data, in webmethod function go ok.
this error:
error on server method 'loguser' ; stack trace; status code: 0; exeption type:; timed out: false some 1 have idea can causing this?
Comments
Post a Comment