views:

2529

answers:

1

I have an MVC 2.0 application that I'm playing around with in VS2010 which is a .Net Framework 4.0 application, which works great on my local dev machine, but fails when IIS gets involved, giving me all sorts of IIS errors.

Can someone please tell me the sequence of steps I need to do in order to get an application set-up in IIS 7.0 (running on Windows 2008 Server)? The best I can get is it showing me the directory contents of the root of my site. :o(

I've followed various SO links to various posts saying that to stop the 403.14 Forbidden error message, you simply enable directory browsing in IIS for my particular app and it's away, but turning it on simply shows be the root-level structure and not actually running my site.

To confirm, the 2008 Server has .Net Framework 4.0 installed, and I have set the 3x MVC 2.0 dlls to Copy Local = true from within Visual Studio 2010, so that the necessary MVC .dlls are present in the bin folder. I have an MVC 1.0 application running on that machine (made using VS2008) but can't seem to get this 2.0 app working

+2  A: 

Check that the IIS7 App Pool that contains the MVC application is the .NET 4 App Pool and not a .NET 2 App Pool.

  1. In the IIS Manager select the Web Site (e.g. "Default Web Site")
  2. In the Actions panel choose "Advanced Settings"
  3. In that dialog there is a list of properties. Select "Application Pool" and click the "..." button next to it
  4. Ensure that the selected application pool is using .NET version 4.0
Eilon