Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript PageMethod故障超过90%的时间_Javascript_C#_Asp.net_Webmethod - Fatal编程技术网

Javascript PageMethod故障超过90%的时间

Javascript PageMethod故障超过90%的时间,javascript,c#,asp.net,webmethod,Javascript,C#,Asp.net,Webmethod,我有一个这样的方法: /// <summary> /// Check if a User Name is valid /// </summary> /// <param name="UserName"></param> /// <param name="UserPassword"></param> /// <returns></returns>

我有一个这样的方法:

    /// <summary>
    /// Check if a User Name is 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;
        }
    }
}

使用这个Web.Config

<configuration>
<system.web>
  <compilation debug="true" targetFramework="4.0" />
  <httpRuntime executionTimeout="3600" maxRequestLength="2147483647" />
</system.web></configuration>

有人知道是什么导致了这种情况吗?

您是否在ScriptManager中添加了EnablePageMethods=“true”?另外,您的意思是调用在服务器端正确命中并返回了对象,但在客户端命中了onError函数吗?您是否在ScriptManager中添加了EnablePageMethods=“true”?另外,您的意思是调用在服务器端正确地命中并返回了对象,但在客户端命中了onError函数吗?
<configuration>
<system.web>
  <compilation debug="true" targetFramework="4.0" />
  <httpRuntime executionTimeout="3600" maxRequestLength="2147483647" />
</system.web></configuration>
Error on the server method 'logUser' ; Stack Trace; Status Code: 0; Exeption Type:; Timed Out: false