I have an ASP.net MVC2 application that is using NHibernate for data access. On every request, even static file requests (images, javascript), a new session is getting created. So for a single view where I'm returning a list, I'm creating around 15 session that don't load anything.
is there way to only create sessions when they are required?
I'm currently using Castle.Windsor to inject the session into my Controllers.
Is there a way to filter out static file requests?