问题
I've deployed a very simple MVC3 RC app to an IIS 6 + Windows 2003 server. I'm just getting a "403 forbidden" error when trying to accesss the root. Right now the app is only one page, so there are no others to try out.
I noticed there is no longer a default.aspx in the root to handle default requests, could this maybe be the problem? Or is there some special config needed for IIS 6?
回答1:
It depends. If you are using extensionless routes then yes there's a special config.
回答2:
I've just deployed an MVC3 RC app on IIS6.0+win2003 server recently,
To get the route works correct ,all your should do is to intall .net framework4.0. see this blog post from Haacked: http://haacked.com/archive/2010/12/22/asp-net-mvc-3-extensionless-urls-on-iis-6.aspx
回答3:
Must read: http://haacked.com/archive/2010/12/22/asp-net-mvc-3-extensionless-urls-on-iis-6.aspx
Also, I installed Webmatrix via Web Platform Installer just to make sure that I had all that I needed. Went through 2 reboots and voila~
回答4:
I had the same problem with Windows Server 2003 IIS6 running a MVC4 app for the first time - in the end a .NET 4 repair (I downloaded the dotNetFx40_Full_x86_x64.exe file from Microsoft and executed it) did the trick!
Recently I again had the same problem on a rebuilt server and this time I had forgotten to check Web Service Extensions (bottom "folder" in IIS6) and found that ASP.NET v4 was Prohibited. I changed it to allowed, restarted IIS Admin Service from Services and it started working.
来源:https://stackoverflow.com/questions/4186695/mvc3-rc-app-deployed-on-iis-6-giving-403-forbidden-error