43
Vote

IIS7 Issue - Microsoft.Practices.CompositeWeb uses HttpRequest in Application_Start

description

IIS7 Integrated mode has removed the HttpRequest context from the Application_Start event. The Microsoft.Practices.CompositeWeb.WebClientApplication class ultimately relies on the HttpRequest object to initialise the web configuration. This needs to be corrected, if nothing else than as a design decision.
 
A specific example is Microsoft.Practices.CompositeWeb.Services.WebConfigModuleInfoStore.GetConfiguration(string configFilePath)
ApplicationPath and PhysicalApplicationPath are both available from the HttpRuntime class.

file attachments

comments

PauloMorgado wrote Mar 10, 2008 at 8:48 PM

I think the impact of this is High.

PauloMorgado wrote Mar 11, 2008 at 11:25 AM

While this isn't solved, there are two workarounds:

Changing the Composite Web Application Block

Changing the application

WCSF 2.0 And IIS7 Integrated Pipeline Mode
http://msmvps.com/blogs/paulomorgado/archive/2008/03/11/wcsf-2-0-and-iis7-integrated-pipeline-mode.aspx

rslaney wrote Mar 11, 2008 at 9:33 PM

I have changed the CompositeWeb library and the system mow appears to correctly run in IIS7 integrated pipeline mode... but as is usual for a developer type I have not tested extensively.

... It works on my machine ..

mbrownbh wrote Jul 30, 2008 at 4:54 PM

Seriously isn't the entire point of the PnP team to show us BEST practices. If the IIS Team removed the request from App_Start, then there is an obvious flaw in using it in the first place.

Just saying, we don't support IIS7 sounds like a cop out to me...

mbrownbh wrote Jul 30, 2008 at 5:13 PM

Oh wait...the work around is to use a classic mode app pool.

MikeNic wrote Jan 19, 2009 at 1:25 PM

Is there an ETA on when this change will be included?

Agreed this is a High Impact issue.

Samjog wrote Dec 15, 2009 at 12:41 PM

We have the same issue,did the same workaround #1 suggested by PauloMorgado
but size of the dll doesn't match.Is that because one is strongnamed?
It also gives 2 compile error in ShellModuleInitializer.cs