Asp.net-mvc – Can ASP.NET MVC 3 run inside a ASP.NET 3.5 web site

asp.netasp.net-3.5asp.net-mvcasp.net-mvc-3

I would like to know if it is at all possible to get an MVC3 solution wrapped in a CWAB (Composite Web Application Block) solution built in 3.5?

I'm aware that in IIS, 2.0/3.5 and 4.0 sites can run next to each other (but in different application pools) but because of the CWAB layer I do not have this luxury. I got MVC2 running successfully before but MVC2 is on the 2.0 runtime if what I've read is true.

I would really like to use Razor as well so going back to MVC2 in this scenario is not really an option.

Best Answer

It should be possible. Just set your application pool runtime to 4.0 instead of 2.0.

.NET 4.0 runtime will be able to handle .NET 3.5 assemblies.