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


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


PauloMorgado wrote Mar 10, 2008 at 7:48 PM

I think the impact of this is High.

PauloMorgado wrote Mar 11, 2008 at 10: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

rslaney wrote Mar 11, 2008 at 8: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 3: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 4:13 PM

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

MikeNic wrote Jan 19, 2009 at 12: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 11:41 AM

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