程序在运行的时候总是报服务器错误,显示”超时时间已到。在操作完成之前超时时间已过或服务器未响应。“要怎么改呢?改哪里啊? 

解决方案 »

  1.   

    1:网站服务器设置的timeout问题
    2:是否有未关闭的数据库连接
    3:服务器超时,是个问题。
    WEB.CONFIG 手工添加httpRuntime,如
    <system.web>
     <httpRuntime maxRequestLength="1000000" executionTimeout="2000" />
    </system.web>
    连接字符串里timeout设置下,command的timeout设置下
      

  2.   

    SqlCommand cmd = new SqlCommand();
    cmd.CommandTimeout = 180;或<system.web>  
    <httpRuntime maxRequestLength="102400" executionTimeout="720" />
    </system.web>