Hi,
In my project I have configured .NET's sessions to go into database. I also have a global.asax which implements Session_Start(). In Session_Start() I write three things to the session:
- The time the session started.
- The user's host address.
- A serializable device object wrapping the user's agent.
The problem is now that users which don't allow cookies won't allow session cookies either. (Easily reproducable by putting the site URL to the restricted sites of IE).
If I keep on refreshing (put finger on F5) a new session is created for every request (-> no session cookie). Shortly, the web server process grows to some hundred megabytes. It does not matter if you use IIS7 or Cassini Local Webserver.
The issue is now: the memory does not get released until the sessions time out. What is the logic here if sessions should really go to database? How long will .NET keep them in memory? Eventually, you'll even get Out Of Memory exceptions!
Anybody know? How to detect and prevent such (almost malicious) "attacks"?
René