Search code examples
windowsweb-configwebserverasp.net-mvc-4redistributable

What needs to be installed in a Windows Server 2008 R2 to allow it to run ASPNET MVC 4 apps?


I've installed the .NET 4.5 framework using the dotNetFx45_Full_x86_x64.exe installer, and the ASPNET MVC4 framework using the AspNetMVC4Setup.exe installer in a Windows 2008 R2 server, yet I keep getting the message 'There is no build provider registered for the extension '.cshtml'.' while trying to run my ASPNET MVC4 app.

I've fixed this temporarily by adding a buildProviders section in my Web.config, but I would like to know how to setup a server so that I can use the current framework without having to touch my Web.config (the same way I can run them in my dev machine).


Solution

  • This is a shot in the dark, but "aspnet_regiis -i" maybe?

    (make sure to run the version in the correct directory on your server)

    http://msdn.microsoft.com/en-us/library/k6h9cz8h(v=vs.80).aspx

    UPDATE:

    Did you also deploy the following .dlls in your BIN folder of your web app?

    • System.Web.Helpers.dll
    • System.Web.Mvc.dll
    • System.Web.WebPages.Deployment.dll
    • system.Web.WebPages.dll
    • System.Web.WebPages.Razor.dll