web.config里面可以设置session的timeout

解决方案 »

  1.   

    Session.Timeout = 10 表示10分钟
      

  2.   

    Server.ScriptTimeout = 1000;//1000 secondsor<configuration>
       <system.web>
          <httpRuntime maxRequestLength="4000"
             useFullyQualifiedRedirectUrl="true"
             executionTimeout="3600"/>
       </system.web>
    </configuration>
      

  3.   

    是不是你的sql连接没有关闭啊,否则除非你的数据库非常庞大一般是不会总超时的。注意:不象asp里可以不用管数据库连接的关闭,在asp.net里最好打开数据库取出数据就要马上关闭。我以前就用的SqlCommand的ExecuteReader(CommandBehavior.CloseConnection)方法,本以为有了CommandBehavior.CloseConnection就可以通过SqlDataReader的Close方法关闭数据库连接,结果却不行。必须显式调用SqlConnection的Close方法。
      

  4.   

    saucer(思归, MS .NET MVP):
     您好,请解释一下  <httpRuntime maxRequestLength="4000"
             useFullyQualifiedRedirectUrl="true"
             executionTimeout="3600"/>
    这段话的含义好吗?
      

  5.   

    说明一下,我想做的不是session的超时。
    saucer(思归, MS .NET MVP):说的方法我试了一下,不管用,页面仍然是30秒后就报超时。
    请教大家,有没有什么办法可以解决。