views:

18

answers:

1

I've got an ASP.NET MVC application running in shared hosting. Recently the site got munged when the application pool was accidentally switched from integrated back to classic mode. We had to change the routes until tech support got the app pool reconfigured.

It would be great if there was a way to detect the application pool mode in code and set the routes accordingly: one route for integrated mode and one for classic. This would prevent the site from going down in these circumstances. An MVC site with its routing blown out looks pretty sad.

+1  A: 

You can use the HttpRuntime.UsingIntegratedPipeline property.

adrift