Please ignore some of the weird styles, doing a big HTML5 upgrade, and it's not quite done yet.

Daniel's Blog

The ramblings of a 22 year old guy.

.Net 4.0 with MVC 2.0 on IIS 7.5

This one has had me stumped for a while – ASP.NET MVC 2 sites refused to run on IIS 7.5 (Windows 7). It would either complain and break. Or show me the files in the directory. After a bit of Googling around – I found a solution (that works for me at least):

Step 1:

Install the .Net Framework 4 into IIS using:

C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis.exe –i

You will need to run it as Administrator if you have UAC turned on.

Step 2:

Install the correct IIS component’s (Control Panel > Add/Remove Windows features > Internet Information Services > World Wide Web Services)

  • Common HTTP features
    • HTTP Errors
    • HTTP Redirection
  • Health and Diagnostics
    • Request Monitoring
    • Tracing

Step 3:

Set the app pool to use ASP.NET 4.0

Screen shot 2010-06-07 at 12.32.35 AM

 

Screen shot 2010-06-07 at 12.33.01 AM

You show now be able to browse to your sites. Not sure why it doesn’t install into IIS by default though…

Post a comment
Comments