I am trying to host a MVC2 website to IIS. Steps I have followed:
Here are the things you might check:
c:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis -
ir
(adapt the paths with the proper version of the framework if necessary).have you found a solution? I've been facing the same issue for hours. Here is my strange story.
I was configuring a fresh win srv 2008 R2 with IIS installed through role (7.5....) and Added the same components I have in my dev environment's IIS. I thought that my system had got .net fw 4.0 because I've been able to crate asp.net 4.0 app pools, maybe because I had already had the 4.5 installed. I had also checked the asp.net installed versions on IIS through aspnet_regiis.exe -lv and my ASP.NET v.4.0.... was magically there in both 32 and 64 bit versions.
but...
I noticed something strange watching at the Default Web Site structure: I had only the aspnet_client\system_web\2_0_50707 folder. So the 4.0.... folder was missing.
My solution. I've uninstalled .net 4.5 from the server, then installed the v.4.0 downloading the package from microsoft. Then I've registered my aspnet 4.0 version using the aspnet_regiis -i present in its folder (%windir%\Microsoft.NET\Framework64\v4.0.30319).
After reinstalling my mvc3/razor web app, everything worked fine, even without installing mvc3 components on the server.
Morale, ensure that you have the fw version of your choice really installed in the system and configured in iis (aspnet).
Hope this helps.
Ciao.