【问题标题】:I can't access hosted pages through IIS我无法通过 IIS 访问托管页面
【发布时间】:2019-10-22 20:04:43
【问题描述】:

我购买了一个新的 VPS,在其中配置了 IIS 管理器,托管了我通常在以前的服务器上托管的应用程序。我无法访问托管项目的 aspx 页面,但可以访问项目的 HTML 页面。怎么回事?

这些是我尝试托管我的应用程序的步骤:

将所有文件复制到: C:\inetpub\wwwroot\MyProjectFolder

Adding application by Right click Default Web Site > Add Application

Provided root project link to application and set Windows User to connect

Checking project is published and running in browser, by Right Click Project > Browse

Browser returning 404.3 - Not Found type error that is: The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

浏览器返回 404.3 - Not Found 类型错误,即“由于扩展​​配置,无法提供您请求的页面。如果页面是脚本,请添加处理程序。如果应该下载文件,请添加 MIME地图。”

【问题讨论】:

  • 检查您的 IIS 安装 - 您是否打开了 ASP.NET 开发功能? Here你可以找到一些关于如何激活所需功能的提示。

标签: c# .net iis


【解决方案1】:

正如 Peter Schneider 所说,您需要检查您是否在服务器中安装了正确的 .netfamwork。

例如,如果您的应用程序是使用 asp.net 4.6 构建的。你应该确保你已经为 asp.net 安装了正确的版本。

您可以通过以下步骤检查它"

控制面板 -> 程序和功能 -> 打开或关闭 Windows 功能

Internet 信息服务具有万维网服务/应用程序开发功能小节

如果你已经安装了,我建议你可以在命令行中运行下面的命令重新为IIS注册asp.net。

%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis.exe -ir

%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-12-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-30
    • 2017-08-07
    • 2011-08-03
    相关资源
    最近更新 更多