it is mainly due to application recycle, seePRB: Session Data Is Lost When You Use ASP.NET InProc Session State Mode http://support.microsoft.com/default.aspx?scid=kb;EN-US;q324772consider to use State Server or SQL Server to store session information
thanks,but 真的只有用数据库存session变量一种方法吗?
The link I provided above suggested some causes of session losses:".... 1. Various attributes (for example, the memoryLimit attribute) have particular settings in the <processModel> section of the configuration file. 2. The Global.asax or the Web.config file was modified. 3. The Bin directory of the Web application was modified. 4. Virus scanning software touched some .config files ...."you should look into your application carefully to see where the problems arebesides using a database to store session states, you can also use a State Server, or actually you can write all the session information into the ViewState or hidden controls
what is the State Server?
what is the State Server?ASP.Net提供了三种保存Session的办法,一种是InProc,也就是保存在本服务器,一种是SQL Server,将Session值保存在数据库Server,第三种就是State Server,把Session保存在单独的服务器上面。
或者直接传不行吗?
另外我在网站根目录下只放置了web.config文件,是不是还需要其他的文件
如果需要其他文件,可不可以提供一下文件中的内容?谢谢谢谢!
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q324772consider to use State Server or SQL Server to store session information
1. Various attributes (for example, the memoryLimit attribute) have particular settings in the <processModel> section of the configuration file.
2. The Global.asax or the Web.config file was modified.
3. The Bin directory of the Web application was modified.
4. Virus scanning software touched some .config files
...."you should look into your application carefully to see where the problems arebesides using a database to store session states, you can also use a State Server, or actually you can write all the session information into the ViewState or hidden controls