Session Hunter allows you to find the largest sessions in your ASP.Net State database and what variables are in them, through an easy to use interface. If you:
- Have software written using ASP.Net
- You are storing ASP.Net sessions in the database (not InProc, StateServer or Custom)
- You are trying to improve performance
Then Session Hunter is a tool you should consider using. The idea is that once you find your worst offenders, you will be able to track down where those session variables are being created and see if you can optimize how they are used, all without changing
any code in an existing application.
The reason I started this was that I was working on a project some time ago where performance was a key driver due to the large number of users in a large web farm. We noticed there was quite a bit of churn in the ASPState database, but it was a mystery to
us because the data in the table is completely obscured. After a great deal of pain, we were finally able to reverse engineer what was in there and we were shocked to discover some sessions as large as 16 MB. This was putting enormous stress on both the web
server and database. We had a very subtle bug, which had been there for some time where we were not clearing the session variable properly and were actually compounding the data stored in there.
A large number of deployments use the ASPState database as the default for any web farm, but very few people validate what is being put in there and hunting down how you are mismanaging yours sessions can be challenging. I wanted to write an elegant tool to
solve a narrow, but common problem for ASP.Net web farms.
Notes to developers: This tool let me try and define some best practices around Windows Presentation Framework (WPF), MVVM Light, Code Contracts, Test Driven Development, unit testing (especially ViewModels) and Moq. Feel free to download the code and use
it for learning purposes. I tried to make it as clear as possible with a large number of comments.