简体   繁体   English

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

[英]Windows Server 2003 IIS Renders ASP.NET 4.0 pages as blank

I have a web project which works fine on my local development machine. 我有一个Web项目,可以在我的本地开发计算机上正常工作。

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. 我将项目复制到我们的UAT服务器,设置指向该项目的虚拟目录,并将其配置为在.NET Framework 4.0上运行。 I even added the Default.aspx page to the Documents tab. 我什至在文档选项卡中添加了Default.aspx页面。 I configured Directory Security to use Windows Authentication. 我将目录安全性配置为使用Windows身份验证。

When i try to access any web page within this application, IIS responds with a blank page. 当我尝试访问此应用程序中的任何网页时,IIS会以空白页进行响应。 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! 提前致谢!

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. 尝试在您的webroot文件夹中允许“所有人”访问,看看是否有任何区别。

  • 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. 确认IIS路径设置正确,但是将一个文本文件放在webroot文件夹中,然后浏览到它并验证其内容是否已显示。

  • Create a basic test.aspx page without any script, just a "Hello World" bit of text, and try browsing to it. 创建一个基本的test.aspx页面,不包含任何脚本,仅输入“ Hello World”文本,然后尝试浏览至该页面。 Confirm that it displays the correct content. 确认它显示正确的内容。

  • Edit web.config and turn off custom errors 编辑web.config并关闭自定义错误

  • Try re-registering the ASP.NET extensions with IIS using aspnet_iis ( details here ) 尝试使用aspnet_iis向IIS重新注册ASP.NET扩展( 在此处详细说明

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. 希望这些测试之一能够为您提供一些详细的错误消息,或者更深入地了解问题的原因。

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: 对于Windows Server 2003上的IIS 6.0,在安装.NET Framework 4.0之后,创建在.NET Framework 4.0下运行的网站或虚拟目录的过程如下:

  1. Create a new application pool. 创建一个新的应用程序池。 Applications running under different frameworks can't be hosted in the same application pool, ie create an application pool perf framework. 在不同框架下运行的应用程序不能托管在同一应用程序池中,即创建一个应用程序池perf框架。

  2. Next, if you are creating a local intranet site or virtual directory, ensure that you don't have "dots" in the application name. 接下来,如果要创建本地Intranet站点或虚拟目录,请确保应用程序名称中没有“点”。 Browsers confuse the dots to be external web sites, forcing them to run under internet zone as appose to the intranet zone. 浏览器将这些点混淆为外部网站,从而迫使它们作为Intranet区域的一部分在Internet区域下运行。

  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. 创建网站或虚拟目录后,请确保它在.NET 4.0应用程序专用的应用程序池下运行。

  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. 确保在创建网站或虚拟目录时,单击ASP.NET选项卡,然后从下拉列表中选择版本4.0。

  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. 花了一段时间才弄清楚。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Windows Server 2003 IIS中将ASP.NET页面与ASP页面混合 - Mixing ASP.NET pages with ASP Pages in windows server 2003 IIS Windows Server 2003 64位上的ASP.NET 4.0 - ASP.NET 4.0 on Windows Server 2003 64-bit 在Windows Server 2003上将ASP.NET 3.5项目部署到IIS 6 - Deploying an asp.net 3.5 project to IIS 6 on windows server 2003 服务器在IIS6上使用asp.net 3.5返回空白页面 - Server returns blank pages with asp.net 3.5 on IIS6 带有 IE11 的 ASP.NET WebForms 4.0 站点不会为 Windows Server 2003 上的 PageRequestManager 加载 ScriptResource - ASP.NET WebForms 4.0 Site with IE11 does not load ScriptResource for PageRequestManager on Windows Server 2003 IIS8上未加载ASP.NET页面(Windows Server 2012) - ASP.NET pages not loading on IIS8 (Windows Server 2012) 将 ASP.NET MVC 3 (Razor) 应用程序发布到运行 Windows Server 2003 和 IIS 6 的远程服务器上 - Publish ASP.NET MVC 3 (Razor) app onto remote server running Windows Server 2003 with IIS 6 hi。如何在Windows Server 2003的IIS6.0中部署Asp.net网站 - hi.how to deploy Asp.net website in IIS6.0 in windows server 2003 IIS 7.5上Windows 2003 R2 Enterprise上的Asp.net - Asp.net on Windows 2003 R2 Enterprise on IIS 7.5 Windows Server 2008 R2 + IIS 7.5 + ASP.NET 4.0 = HTTP错误500.0 - Windows Server 2008 R2 + IIS 7.5 + ASP.NET 4.0 = HTTP Error 500.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM