NH Prof new featureFilter static files
One of the most annoying things about doing the TekPub episodes is finding the right session, because NH Prof will detect any session opening. This means that it usually looks like this:
Which also means that it is pretty hard to figure out. I got annoyed enough with that to add a specific filter to filter all of those in one shot (you could already do it, but it meant creating several filters):
Which results in a much better experience:
More posts in "NH Prof new feature" series:
- (09 Dec 2010) Alert on bad ‘like’ query
- (10 Dec 2009) Filter static files
- (16 Nov 2009) Exporting Reports
- (08 Oct 2009) NHibernate Search Integration
- (19 Aug 2009) Multiple Session Factory Support
- (07 Aug 2009) Diffing Sessions
- (06 Aug 2009) Capturing DDL
- (05 Aug 2009) Detect Cross Thread Session Usage
- (22 May 2009) Detecting 2nd cache collection loads
- (15 May 2009) Error Detection
- (12 May 2009) Queries by Url
- (04 Feb 2009) View Query Results
- (18 Jan 2009) Superfluous <many-to-one> update
- (18 Jan 2009) URL tracking
- (10 Jan 2009) Detecting distributed transactions (System.Transactions)
- (06 Jan 2009) The Query Cache
- (05 Jan 2009) Query Duration
- (24 Dec 2008) Unbounded result sets
- (24 Dec 2008) Row Counts
Comments
Couldn't you have just used the 'sessions with statements' filter? Or am I missing something here...
Simon,
Yes... and now you make me feel stupid :-)
Although, you actually do sometimes want to see empty sessions created from other places
Sorry! :-)
Always useful to have more filters anyway!
which leads to a question why static file requests create sessions at all?
Rafal,
This is pretty common in apps that are developed on Cassini and then deployed to IIS
On IIS, it will handle static files directly, but cassini make them go through the ASP.Net pipeline.
Ok,
ASP.NET pipeline, but why do somebody want to open a session directly and not wrap it in something lazy?
Liviu,
It is simpler
Pain Driven Development, Nice!
I can understand that you might sometimes want to see sessions listed if there are 0 statements. How about automatically "grey out" (or visually de-emphasize somehow) sessions with 0 statements? This would be in addition to your static file filter.
IIS7 integrated mode will make static files go through the ASP pipeline as well.
In my opinion, the right fix would be either to assign static handlers to css, js, gif, jpg... files. An alternative is to create a session inside a controller and only dispose it through a module if you want to take advantage of security, etc.
Comment preview