ASP.NET MVC on IIS 7.5

前端 未结 28 2019
北荒
北荒 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:14

    I created a new namespace (and therefore folder) identical to the route to a controller (e.g. MvcApp/Test/SomeClasses.cs and MvcApp/Controllers/TestController.cs). This resulted also in a 403.14!

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

    In my case ASP.NET 4.5 is not installed on the server so installing ASP.NET 4.5 fixed the issue.

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

    I had another problem that led to this issue.

    • I had ensured my app pool was running .net 4 in integrated mode
    • I had run aspnet_regiis.exe -i
    • I had checked folder permissions were set correctly for the account running my app pool

    None of these things worked. It turned out that in my web.config under system.webserver > modules I had the following:

    <remove name="WindowsAuthentication" />
    

    Obviously this removed the windows authentication module which seemed to somehow knock everything off kilter.

    I hope this helps someone, as this cost me most of an evening!

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

    If you're running IIS 8.5 on Windows 8, or Server 2012, you might find that running mvc 4/5 (.net 4.5) doesn't work in a virtual directory. If you create a local host entry in the host file to point back to your local machine and then point a new local IIS website to that folder (with the matching host header entry) you'll find it works then.

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

    This worked for me and it might be useful to another one.

    Maybe all components required are not present or/and not all are registered correctly. In order to solve this, try to uncheck all options inside Control Panel -> Turn Windows features on or off -> Internet Information Services -> World Wide Web Services -> Application Development Features, uncheck all options and recheck all then reset the IIS and check if the problem is solved.

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

    Also u can switch AppPool to Integrated mode. Thnx to Michael Bianchi (https://stackoverflow.com/a/7956546/1143515), I only want to underline that.

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