ASP.NET MVC on IIS 7.5

前端 未结 28 2021
北荒
北荒 2020-11-22 11:33

I\'m running Windows 7 Ultimate (64 bit) using Visual Studio 2010 RC. I recently decided to have VS run/debug my apps on IIS rather than the dev server that comes with it. <

相关标签:
28条回答
  • 2020-11-22 12:20

    For me on an Azure Server 2012 R2 IIS 8.5 VM with an Asp.Net MVC 5 app (bin deployed MVC 5) I had to do the following from an elevated cmd prompt even though I had 4.5 already installed:

    dism /online /enable-feature /featurename:IIS-ASPNET45
    

    Source: http://support.microsoft.com/kb/2736284

    I also brute force installed all IIS features with the following PowerShell:

    import-module servermanager
    add-windowsfeature web-server -includeallsubfeature
    

    Source: http://www.iis.net/learn/install/installing-iis-85/installing-iis-85-on-windows-server-2012-r2

    Now my app is working.

    0 讨论(0)
  • 2020-11-22 12:20

    We had a MVC application moved to a new server. .NET 4 and MVC 3 was installed, but we still got “Error 403.14″. In this case, this meant that IIS did not understand that it was dealing with a MVC application, it was looking for the default page.

    The solution was simple: HTTP Redirection was not installed on the server.

    Server Manager – Roles – Web Server (IIS) – Roles Services – HTTP Redirection: Not installed. Installed it, problem solved.

    0 讨论(0)
  • 2020-11-22 12:20

    Also if your app is precompiled you should have

    PrecompiledApp.config

    in the root folder of your app otherwise you could get HTTP Error 403.14 as well.

    0 讨论(0)
  • 2020-11-22 12:20

    I had used the WebDeploy IIS Extension to import my websites from IIS6 to IIS7.5, so all of the IIS settings were exactly as they had been in the production environment. After trying all the solutions provided here, none of which worked for me, I simply had to change the App Pool setting for the website from Classic to Integrated.

    0 讨论(0)
  • 2020-11-22 12:20

    For me, the solution was to add the NuGet package Microsoft.AspNet.WebPages (plus it's Razor and Infrastructure dependencies) to my web project.

    Infrastructure had to be forcefully reinstalled as it was not added as a reference at first.

    0 讨论(0)
  • 2020-11-22 12:21

    To solve this problem without having to resort to 32 bit mode you will have to update the source code for this project

    public static void RegisterUrlRoutesFromAttributes(RouteCollection routes)
    {
        // Enumerate assembly for UrlRoute attributes.
        List<MapRouteParams> routeParams = new List<MapRouteParams>();
        AppDomain.CurrentDomain.GetAssemblies()
            .ToList()
            .ForEach(assembly => routeParams.AddRange(GetRouteParamsFromAttributes(assembly)));
    

    I have raised this issue as a discussion on the discussion board at the IT cloud codeplex project.

    http://itcloud.codeplex.com/discussions/262000

    0 讨论(0)
提交回复
热议问题