ASP.NET MVC & Windsor.Castle: working with HttpContext-dependent services
Posted
by Igor Brejc
on Stack Overflow
See other posts from Stack Overflow
or by Igor Brejc
Published on 2009-11-30T10:01:39Z
Indexed on
2010/05/18
5:50 UTC
Read the original article
Hit count: 210
I have several dependency injection services which are dependent on stuff like HTTP context. Right now I'm configuring them as singletons the Windsor container in the Application_Start handler, which is obviously a problem for such services.
What is the best way to handle this? I'm considering making them transient and then releasing them after each HTTP request. But what is the best way/place to inject the HTTP context into them? Controller factory or somewhere else?
© Stack Overflow or respective owner