Windows Server 2003 IIS 将 ASP.NET 4.0 页面呈现为空白

发布于 2024-10-03 23:33:55 字数 272 浏览 0 评论 0原文

我有一个网络项目,在我的本地开发机器上运行良好。

我将该项目复制到我们的 UAT 服务器,设置一个指向该项目的虚拟目录并将其配置为在 .NET Framework 4.0 上运行。我什至将 Default.aspx 页面添加到“文档”选项卡中。我将目录安全性配置为使用 Windows 身份验证。

当我尝试访问此应用程序中的任何网页时,IIS 会返回一个空白页。我查看了事件日志,没有发现任何错误。

有人可以帮助我了解发生了什么事以及如何解决这个问题吗?

提前致谢!

I have a web project which works fine on my local development machine.

I copied the project to our UAT server, setup a virtual directory pointing to the project and configured it to run on .NET Framework 4.0. I even added the Default.aspx page to the Documents tab. I configured Directory Security to use Windows Authentication.

When i try to access any web page within this application, IIS responds with a blank page. I looked through the event logs and don't see any errors anywhere.

Can someone please help me understand what's going on and how to remedy this?

Thanks in advance!

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

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

发布评论

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

评论(2

杯别 2024-10-10 23:33:55

如果您只是在事件日志中看到一个没有错误的白页,那么听起来这可能是应用程序而不是托管环境的问题。

但是,您可以尝试采取一些措施来解决此问题。

  • 检查文件夹权限。尝试允许“所有人”访问您的 webroot 文件夹,看看这是否有任何区别。

  • 确认 IIS 路径设置正确,但将一个文本文件放入您的 webroot 文件夹中,然后浏览到该文件并验证其内容是否显示。

  • 创建一个基本的 test.aspx 页面,无需任何脚本,只需一段“Hello World”文本,然后尝试浏览它。确认它显示正确的内容。

  • 编辑 web.config 并关闭自定义错误

  • 尝试使用 aspnet_iis (详细信息此处)

希望这些测试之一能够为您提供某种详细的错误消息或更深入地了解问题的原因。

If you're just seeing a white page with no errors in the event log, it sounds like it could be a problem with the application rather than the hosting environment.

However, there are a few things you could try to doing to troubleshoot this.

  • Check folder permissions. Try allowing "Everyone" access on your webroot folder and see if that makes any difference.

  • Confirm that the IIS path is set up correctly but putting a text file in your webroot folder, and then browsing to it and verifying that it's contents are displayed.

  • Create a basic test.aspx page without any script, just a "Hello World" bit of text, and try browsing to it. Confirm that it displays the correct content.

  • Edit web.config and turn off custom errors

  • Try re-registering the ASP.NET extensions with IIS using aspnet_iis (details here)

Hopefully, one of these tests will be able to give you some kind of detailed error message or more insight into the cause of the problem.

无人问我粥可暖 2024-10-10 23:33:55

对于 Windows Server 2003 上的 IIS 6.0,安装 .NET Framework 4.0 后,创建在 .NET Framework 4.0 下运行的网站或虚拟目录的过程如下:

  1. 创建新的应用程序池。
    运行在不同环境下的应用程序
    框架不能托管在
    相同的应用程序池,即创建
    应用程序池性能框架。

  2. 接下来,如果您要创建本地
    Intranet 站点或虚拟目录,
    确保你没有“点”
    应用程序名称。浏览器
    将点混淆为外部网络
    网站,迫使它们在
    互联网区域与
    Intranet 区域。

  3. 创建网站后或
    虚拟目录,确保它
    在应用程序池下运行
    专用于 .NET 4.0 应用程序。

  4. 确保在创建您的
    网站或虚拟目录,您
    单击 ASP.NET 选项卡并选择
    从下拉菜单中选择版本 4.0。

  5. 然后你就可以按照
    正常,有任何其他附加
    您可能需要的设置。

希望这可以帮助遇到类似问题的人。花了一段时间才弄清楚。

For IIS 6.0 on Windows Server 2003, after the install of .NET Framework 4.0, the process of creating Web Sites or Virtual Directories that run under .NET Framework 4.0 is as follows:

  1. Create a new application pool.
    Applications running under different
    frameworks can't be hosted in the
    same application pool, i.e. create
    an application pool perf framework.

  2. Next, if you are creating a local
    intranet site or virtual directory,
    ensure that you don't have "dots" in
    the application name. Browsers
    confuse the dots to be external web
    sites, forcing them to run under
    internet zone as appose to the
    intranet zone.

  3. Once you create your web site or
    virtual directory, make sure that it
    runs under an application pool
    dedicated for .NET 4.0 applications.

  4. Ensure that when creating your
    website or virtual directory, you
    click on the ASP.NET tab and select
    version 4.0 from the drop down.

  5. Then you may configure as per
    normal, with any other additional
    settings you may require.

Hope this helps someone experiencing similar issues. Took a while to figure out.

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