为什么 IIS 不提供 aspx 页面?

发布于 2024-07-25 15:43:31 字数 110 浏览 1 评论 0原文

我正在 IIS 下将 ASP.NET 应用程序部署到 Windows Server 2003

IIS 可以很好地提供 html 页面,但是当我尝试提供 IIS 页面时,我得到一个未找到页面

I'm deploying an ASP.NET application to Windows Server 2003 under IIS

IIS is serving html pages fine but I get a page not found when I try and serve IIS pages

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

一梦等七年七年为一梦 2024-08-01 15:43:31

您可能需要为 ASP.NET 应用程序“注册”IIS。 以管理员身份运行命令“%systemroot%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i”。 此外,您可能需要通过 IIS 管理控制台将网站转换为应用程序。

You may need to "register" IIS for ASP.NET applications. As an administrator, run the command "%systemroot%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis -i". In addition, you may need to convert your web site to an application through the IIS management console.

山田美奈子 2024-08-01 15:43:31

默认情况下,IIS 在 IIS6 中禁用 ASP 支持。

运行 Microsoft® Windows® Server 2003 系列成员的服务器支持应用程序服务器功能,其中 Microsoft ASP.NET 作为您在配置应用程序服务器角色时可以启用的选项。 要将 ASP.NET Web 应用程序部署到生产服务器,必须确保在分发应用程序之前在生产服务器上启用 ASP.NET 和 Internet 信息服务 (IIS) 角色。

请参阅此处以获取启用它的说明:
http:// /www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/9fc367dd-5830-4ba3-a3c9-f84aa08edffa.mspx?mfr=true

By default, IIS has ASP support disabled in IIS6.

A server running a member of the Microsoft® Windows® Server 2003 family supports application server functionality, with Microsoft ASP.NET as an option that you can enable when configuring the application server role. To deploy ASP.NET Web applications to a production server, you must be sure to enable the ASP.NET and Internet Information Services (IIS) roles on the production server before you distribute the application.

See here for instructions to enable it:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/9fc367dd-5830-4ba3-a3c9-f84aa08edffa.mspx?mfr=true

这个俗人 2024-08-01 15:43:31

其他可能的原因可能是 Web 服务扩展,其中 ASP.NET 版本可能已被禁用。 我的另一篇文章此处解释了解决此问题的步骤。

Other possible reason could be Web Service Extensions, where ASP.NET version could have been disabled. My other post here explains steps to solve this.

甜心 2024-08-01 15:43:31
  1. 确保正确安装了正确的 .NET 框架
  2. 确保启用了 ASP.NET 扩展
  3. 在网站属性的 ASP.NET 选项卡下,确保设置了正确的版本。
  1. Make sure the right .NET framework is installed properly
  2. Make sure the ASP.NET extension is enabled
  3. Under website properties, ASP.NET tab, make sure the right version is set.
花想c 2024-08-01 15:43:31

在遇到同样的问题并尝试上述所有方法后没有任何运气。 我们重新安装了 Windows 2003 SP2,这解决了我们的问题。 我也曾多次看到这个问题通过其他答案得到解决。 大多数时候,只需重新安装 .Net 2.0 即可解决问题,但这次不行。

After having this same issue and trying all of the above without any luck. We reinstalled SP2 for Windows 2003 and this resolved our issue. I too have seen this problem resolved a few times with the other answers. Most of the time just reinstalling .Net 2.0 resolves the issue but not this time.

埋情葬爱 2024-08-01 15:43:31

为了将来参考,这也可能是问题:

Windows Server 64 位上的 IIS 只能在 32 或 64 位模式下运行。

简而言之,您需要:

1) 运行 adsutil.vbs 以在 win 64 上启用 32 位 asp.net 应用程序

2) 调用 aspnet_regiis.exe 重新注册 IIS

3) 重新打开 IIS 管理器,进入 Web 服务扩展列表并确保 ASP .Net 版本 {2/4.xxx}(32 位)设置为“允许”

(如果您想在 Framework 2.0 和 4.0 上运行 ASP.NET 应用程序,您可能需要对这两个版本执行步骤 2 和 3)

完整详细信息位于以下链接中:http://support.microsoft.com/kb/894435

For future reference, this could also be the issue:

IIS on a Windows Server 64-bit can only to run in either 32 or 64 bit mode.

In short you need to:

1) run adsutil.vbs to enable 32 bit asp.net apps on win 64

2) re-register IIS calling aspnet_regiis.exe

3) re-open IIS Manager, go into Web service extension list and ensure ASP.Net version {2/4.xxx} (32-bit) is set to Allowed

(You might need to do Steps 2 and 3 for both Framework 2.0 and 4.0 if you want to run asp.net apps on both versions)

Full details are in the following link: http://support.microsoft.com/kb/894435

妄司 2024-08-01 15:43:31

另一个未来的参考,以防这对使用与我的类似路径的任何人有帮助。

我的 ASP.NET 应用程序后端是 MySql 而不是 Sql Server,这对我来说意味着拥有一个 mysql 连接器,我的 IIS 不提供 .aspx 文件的原因是因为在我的开发环境中我使用的是不同版本的 MySql连接器而不是我的生产环境中安装的连接器,我更新了生产服务器上的 MySql 连接器以匹配我在开发环境上使用的版本,并且效果很好。

Another future reference in case this is helpful to anyone who used a similar path to mine.

My back end for the ASP.NET app was MySql not Sql Server, which for me meant having a mysql connector, the reason my IIS was not serving the .aspx file is because on my development environment I was using a different version of the MySql connector than the one installed on my production environment, I updated the MySql connector on the production server to match the version Im using on the development environment and it worked great.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文