开发者

why the session in iis automatically log out?

I used iis6, and when i called a function Directory.delete(), the all the session relate this website will be logged out. and i debugged the website, i found no exception. any one have ideas on this ? Thanks开发者_C百科 in advance!


I assume the directory you are trying to delete is within the website folder.

When you delete a folder inside a website, then asp.net will restart resulting in loss of session state.

To avoid this problem

1) Try to implement out-of-process session state.

OR

2) Move the folder out of web application folder.


If you create, delete or change any directory or files underneath the web application directory while the app is running, ASP.NET unloads the appdomain thinking that the code has changed and needs to be reloaded. This clears all session state, etc. You'll need to move any file/directory create/delete/change stuff to a directory outside the web application directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜