在Windows 8 MVC 4的网站.NET 4.5的IIS 8给出了403.14 Forbidden错误 [英] MVC 4 website with .NET 4.5 on IIS 8 in Windows 8 gives 403.14 forbidden error

查看:1093
本文介绍了在Windows 8 MVC 4的网站.NET 4.5的IIS 8给出了403.14 Forbidden错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,我建在使用MVC 4的Visual Studio 2012和.NET Framework 4.5。当我尝试通过IIS 8运行Windows 8专业版的机器上运行它,我得到一个错误403.14。它说

I have a website that I built in Visual Studio 2012 using MVC 4 and .NET framework 4.5. When I try to run it via IIS 8 on a machine running Windows 8 Pro, I get a 403.14 Error. It says

故宫
Web服务器配置为不列出此目录的内容。

"Forbidden The Web server is configured to not list the contents of this directory.

最可能的原因:
默认文档未配置为请求的URL,和目录浏览未在服务器上启用。

Most likely causes: A default document is not configured for the requested URL, and directory browsing is not enabled on the server."

这里有一些事情我已经试过,没有工作:

Here are some things I have tried that did not work:


  • 运行%WINDIR%\\ Microsoft.NET \\框架\\ v4.0.30319 \\ ASPNET_REGIIS.EXE -i
    %WINDIR%\\ Microsoft.NET \\框架\\ v4.0.30319 \\ ASPNET_REGIIS.EXE -ir 在这个和Framework64目录两者。这给了这个错误:不支持这个版本的操作系统,此选项管理员应该使用,而不是安装/卸载ASP.NET 4.5与IIS8打开Windows功能打开/关闭对话框中,服务器管理器的管理工具,或在dism.exe命令行工具。有关详细信息,请参阅<一个href=\"http://go.microsoft.com/fwlink/?LinkID=216771\">http://go.microsoft.com/fwlink/?LinkID=216771.\"链接都到了有关Windows Server 2012页,其中也于事无补。我无法找到特定设置打开Windows功能打开或关闭对话框中的IIS 8.与.NET 4.5一切都被打开。

  • 添加到在Web.config中。这使错误:这部分配置不能在这个路径中使用时,部分是在父级别锁定这发生锁定或者是默认设置的(overrideModeDefault =拒绝),或通过包含overrideMode位置标记明确设置=拒绝或旧有的allowOverride =false的。

  • Run %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -i and %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ir in both this and the Framework64 directory. This gives this error: "This option is not supported on this version of the operating system. Administrators should instead install/uninstall ASP.NET 4.5 with IIS8 using the "Turn Windows Features On/Off" dialog, the Server Manager management tool, or the dism.exe command line tool. For more details please see http://go.microsoft.com/fwlink/?LinkID=216771." The link goes to a page about Windows Server 2012 which does not help. I could not find a specific setting in "Turn Windows Features on or off" dialog for iis 8. Everything relating to .net 4.5 is turned on.
  • Add to in Web.config. This gives the error: "This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false"."

我已经确定.NET 4.5安装在服务器上(安装程序说,它内置在Windows 8,不需要安装)。应用程序池是使用.NET 4.0,综合管线的默认池,并启用32位应用程序。我发布到默认目录(的Inetpub \\ wwwroot的),那就是有工作的罚款默认的站点。 HTTP重定向中的启用Windows功能打开或关闭开启

I have made sure .net 4.5 is installed on the server (the installer said it is built into windows 8 and does not need to be installed). The application pool is the default pool using .net 4.0, integrated pipeline, with 32 bit applications enabled. I'm publishing to the default directory (inetpub\wwwroot) and the default site that was there worked fine. HTTP Redirection is turned on in "Turn windows features on or off"

任何人都可以提供任何更多的见解?

Can anyone offer any more insights?

编辑:
好吧,我张贴此之后,当然对的,我发现一些作品。进入数字。

Well, of course right after I post this I found something that works. Go figure.

在打开Windows功能打开或关闭Internet信息服务 - >万维网服务 - >应用程序开发功能,确保.NET扩展性3.5,.NET 4.5 Extesibility,ASP.NET 3.5,ASP.NET 4.5,ISAPI扩展和ISAPI过滤器的选择。

In "Turn Windows Features on or off", under Internet Information Services -> World Wide Web Services -> Application Development Features, make sure that .NET Extensibility 3.5, .NET Extesibility 4.5, ASP.NET 3.5, ASP.NET 4.5, ISAPI Extensions, and ISAPI Filters are SELECTED.

这是这里概述:<一href=\"http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45#TOC301258515\">http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45#TOC301258515但因为这所指向来代替Windows 8的2012服务器我无法找到这些设置正确的位置。

This was outlined here: http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45#TOC301258515 but since that refered to server 2012 instead of windows 8 I couldn't find the right location for these settings.

希望这有助于有类似问题的人。感谢您的阅读。

Hope this helps anyone with a similar problem. Thanks for reading.

推荐答案

在打开Windows功能打开或关闭Internet信息服务 - >万维网服务 - >应用程序开发功能,确保.NET扩展3.5 ,.NET 4.5 Extesibility,ASP.NET 3.5,ASP.NET 4.5,ISAPI扩展和ISAPI过滤器的选择。

In "Turn Windows Features on or off", under Internet Information Services -> World Wide Web Services -> Application Development Features, make sure that .NET Extensibility 3.5, .NET Extesibility 4.5, ASP.NET 3.5, ASP.NET 4.5, ISAPI Extensions, and ISAPI Filters are SELECTED.

这是这里概述:<一href=\"http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45#TOC301258515\">http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45#TOC301258515但因为这所指向来代替Windows 8的2012服务器我无法找到这些设置正确的位置。

This was outlined here: http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45#TOC301258515 but since that refered to server 2012 instead of windows 8 I couldn't find the right location for these settings.

注:答案加入到清洁,从没有答案的问题

这篇关于在Windows 8 MVC 4的网站.NET 4.5的IIS 8给出了403.14 Forbidden错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆