如何解决使用本地IIS运行ASP MVC项目时显示错误
我正在使用简单的ASP MVC项目作为android应用程序的WebServer。 当使用IIS Express运行项目时,所有操作均有效,但是当使用本地IIS运行时,将出现此错误
Most likely causes:
A default document is not configured for the requested URL,and directory browsing is not enabled on the server.
Things you can try:
If you do not want to enable directory browsing,ensure that a default document is configured and that the file exists.
Enable directory browsing using IIS Manager.
Open IIS Manager.
In the Features view,double-click Directory Browsing.
On the Directory Browsing page,in the Actions pane,click Enable.
Verify that the configuration/system.webServer/directoryBrowse@enabled attribute is set to true in the site or application configuration file.
启用目录浏览后,将显示文件夹和文件列表。根据{{3}}链接,将<modules runAllManagedModulesForAllRequests="true" />
添加到web.config中的<system.webServer>
部分时,将出现以下错误:
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x80070021
Config 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".
我的IIS版本:10 .Net:4.5.2
解决方法
要解决此问题,您可以按照以下步骤操作:
1)打开“打开或关闭Windows功能”
2)在“应用程序开发”下,选择.NET Extensibility 4.5,ASP.NET 4.5和两个ISAPI条目
单击“确定”并完成安装。
完成这些更改后,重新启动iis服务器。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。