Windsor Castle: PerThread vs. PerWebRequest in ASP.NET

Many people seem to use the PerWebRequest style in web applications to manage specific contexts. I have two problems:

  • PerWebRequest is dependent on the http module (right?).

2. PerWebRequest is dependent on HttpContext. I have ASP.NET code that fires in a separate thread (and loses an HttpContext).

It seems that ASP.NET/IIS is starting a new thread for each web request. Is there a reason to not just use the PerThread style and not worry about these dependencies? Or is there an advantage to PerWebRequest?

+4
source share

All Articles