NH Prof new feature: Filter 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:
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.