为什么 IIS 不提供 aspx 页面?
我正在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
您可能需要为 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.
默认情况下,IIS 在 IIS6 中禁用 ASP 支持。
请参阅此处以获取启用它的说明:
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.
See here for instructions to enable it:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/9fc367dd-5830-4ba3-a3c9-f84aa08edffa.mspx?mfr=true
其他可能的原因可能是 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.
在遇到同样的问题并尝试上述所有方法后没有任何运气。 我们重新安装了 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.
为了将来参考,这也可能是问题:
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
另一个未来的参考,以防这对使用与我的类似路径的任何人有帮助。
我的 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.