【问题标题】:IIS 10 - File or directory not foundIIS 10 - 找不到文件或目录
【发布时间】:2018-10-10 15:40:00
【问题描述】:

我有一个用 Visual Studio 制作的 Web 应用程序。 每当我导航到它时,我都会得到 404。 例如,我可以访问:“xyz.net/res/image.png”,但我不能访问“default.aspx”。

默认文档:

绑定:

应用程序池:

当我在端口 80 上导航到 localhost 时会发生这种情况:

我之前使用 IIS 设置并运行了一个 Web 服务器,但从那以后我重新安装了 Windows,但我无法弄清楚。 在我修改它之前,我可以访问 localhost。 文件路径似乎是正确的,但我认为否则我将无法访问 png 文件。 任何帮助表示赞赏。

【问题讨论】:

    标签: .net iis server http-status-code-404


    【解决方案1】:

    其他人正在为这个问题苦苦挣扎。修复方法是在 Windows 控制面板下的“打开/关闭 Windows 功能”下启用应用程序开发。

    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.
    

    我附上了在 Web 服务器 IIS > 应用程序开发下哪里可以找到 ASP.NET 功能的屏幕截图。

    希望这可以帮助任何收到 404 错误消息以尝试执行 .aspx 页面的人。

    【讨论】:

      【解决方案2】:

      我设法修复它!我启用了一些 Windows 功能,仅此而已。 我不知道哪一个有帮助,因为我启用了几十个,但是如果你遇到这个问题并且无法解决它,你可以试一试。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-12-19
        • 1970-01-01
        • 1970-01-01
        • 2020-02-25
        • 2018-11-03
        • 2015-01-25
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多