动态地将控件添加到ASP.NET - 视图状态20分钟后不保留 [英] Dynamically adding controls to ASP.NET - viewstate is not retained after 20 minutes

查看:61
本文介绍了动态地将控件添加到ASP.NET - 视图状态20分钟后不保留的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个ASP.net形式[在IIS 6 .NE​​T 3.5]动态加载控件。我们能够保留值在ViewState中的只要回发情况有20分之内。该数据库还得到正确更新。一切正常。

We have a ASP.net form [.NET 3.5 on IIS 6] that loads controls dynamically. We are able to retain the values in the viewstate as long as the postback happens within 20 minutes. The database also gets updated properly. Everything works as expected.

不过,如果需要超过20分钟的用户填写表单,控件不再回传过程中保留其值。会话值是否完好,用户认证也完好无损。我们尝试了几件事

However, If it takes more than 20 minutes for a user to fill out the form, the controls no longer retain their values during postbacks. The session values are intact, the user authentication is also intact. We tried several things

1)新增机键的Web.config文件 - 我们必须由Windows负载平衡器平衡2 web服务器负载

1) Added machine keys to web.config files - we have 2 web servers load balanced by Windows load balancer

2)证实,用户被路由到相同的服务器 - 因为会话是粘

2) We confirmed that the user are routed to the same server – because the sessions are sticky

3)增加了会话超时60分钟在II​​S 6.0

3) Increased the session timeout to 60 minutes in IIS 6.0

4)增加了连接池空闲超时60分钟

4) Increased the Idle timeout for connection pool to 60 minutes

5)变更表身份验证票证超时时间为60分钟。

5) Changed Form authentication ticket timeout to 60 minutes

任何帮助将是AP preciated。

Any help would be appreciated.

- 谢谢

推荐答案

20分钟为应用程序池回收的默认超时。在服务器上运行IIS管理器,进入应用程序池属性,并取消勾选回收工作进程(分钟),或将其设置为60。

20 minutes is the default timeout for application pool recycling. Run IIS Manager on the server, go into the Application Pool properties, and unclick 'Recycle worker processes (in minutes)', or set it to 60.

这篇关于动态地将控件添加到ASP.NET - 视图状态20分钟后不保留的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆