服务器在IIS6上使用asp.net 3.5返回空白页面

时间:2021-10-17 18:16:31

I have a problem with site deployed on IIS6 sever. Here the problem, when I first deploy asp.net 3.5 site to server (site is relatively small with 5 pages and 5 libraries in bin), it is works as expected. But after some period of time (~1h) server returns black pages instead of expected content:

我在IIS6服务器上部署的站点有问题。这里的问题,当我第一次将asp.net 3.5站点部署到服务器(站点相对较小,有5个页面和5个库中的bin)时,它按预期工作。但经过一段时间(~1h)服务器返回黑页而不是预期的内容:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8"></HEAD>
<BODY></BODY></HTML>

First my idea was that my site conflicts with other .net 2.0 sites that hosted in the same server, so I put my site into dedicated pool but without success. First time site works, then no. There is no errors or something like that in iis logs. And I do not use ClearError() method in my site.

首先我的想法是我的网站与托管在同一服务器上的其他.net 2.0网站冲突,因此我将我的网站放入专用池但没有成功。第一次网站工作,然后没有。在iis日志中没有错误或类似的错误。我不在我的网站中使用ClearError()方法。

I have found similar question here (I’m getting blank pages instead of error messages using classic ASP, IIS6 and WinServer 2003 R2), but it is for classic ASP.

我在这里找到了类似的问题(我使用经典ASP,IIS6和WinServer 2003 R2获取空白页而不是错误消息),但它适用于经典ASP。

Also several topics at ASP.NET:

ASP.NET的几个主题:

But this solutions also not help me. For example when I replace web.config with new one, or replace one of the required assemblies with rebuilded one, I have the same result. First time site works, then - black pages.

但是这个解决方案对我没有帮助。例如,当我用新的替换web.config,或用重建的一个替换其中一个必需的程序集时,我得到相同的结果。第一次网站工作,然后 - 黑页。

From what I see, I think that this is kind of configuration problem, but I completely stunned right now, because I've tried everything and now I lack any ideas, so help is very appreciated.

从我看来,我认为这是一种配置问题,但我现在完全震惊,因为我已经尝试了一切,现在我缺乏任何想法,所以非常感谢帮助。

4 个解决方案

#1


I have just had exactly the same problem with IIS 7.5.

我刚刚遇到与IIS 7.5完全相同的问题。

I tried uninstalling IIS multiple times, changing configuration etc., but nothing seemed to do any difference. I followed all the guides available - still nothing.

我尝试多次卸载IIS,更改配置等,但似乎没有任何区别。我按照所有可用的指南 - 仍然没有。

What I ended up doing, was completely removing IIS and all related files and configuration (except registry settings):

我最终做的是完全删除IIS以及所有相关文件和配置(注册表设置除外):

  • Uninstall IIS via Add/Remove Programs > Turn Windows Features on or off
  • 通过“添加/删除程序”>“打开或关闭Windows功能”来卸载IIS

  • Rebooted
  • Removed the directory including all files: c:\inetpub
  • 删除了包含所有文件的目录:c:\ inetpub

  • Removed the folder inkluding all files: C:\Windows\System32\inetsrv
  • 删除了包含所有文件的文件夹:C:\ Windows \ System32 \ inetsrv

  • Reinstalled IIS via Add/Remove Programs > Turn Windows Features on or off
  • 通过“添加/删除程序”重新安装IIS>打开或关闭Windows功能

Finally it worked. Hope someone else will benefit from this :)

最后它奏效了。希望别人能从中受益:)

#2


I didn't find the origins of the problem. However problem was solved by using Publish Project wizard. Original variant was distributed at xcopy basis with code-behind sources.

我没有找到问题的根源。但是,使用“发布项目”向导解决了问题。原始变体在xcopy基础上与代码隐藏源一起分发。

#3


Looks like its an issue with your browser temporary files. I am assuming you are using Internet Explorer browser in which case try the following:

看起来它是您的浏览器临时文件的问题。我假设您使用的是Internet Explorer浏览器,请尝试以下操作:

Goto Tools->Internet Options. Under 'General' tab, clear the browser history by clicking on 'delete' button.

转到工具 - > Internet选项。在“常规”标签下,点击“删除”按钮清除浏览器历史记录。

#4


I had a similar issue on our QA Server (with the latest changes). Everything was running 100% on the development box but not on QA. Eventually I had to overwrite my QA server with code from Production and then used Beyond Compare to transfer changes file by file and line by line. The error came from the CSS snippet below. I didn't find the reason why but I wrote a work around.

我的QA服务器上有类似的问题(最新的更改)。一切都在开发盒上运行100%但在QA上没有运行。最终,我不得不用生产中的代码覆盖我的QA服务器,然后使用Beyond Compare来逐个文件地逐行传输更改。该错误来自下面的CSS代码段。我没有找到原因,但我写了一个工作。

.dt-action-text {
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif !important;
    color: #333333 !important;
    margin-left: 5px !important;
}

This was done to override the the parent settings, but didn't work so well.

这样做是为了覆盖父设置,但效果不好。

In short: Check your CSS as well, it might be the culprit.

简而言之:检查你的CSS,它可能是罪魁祸首。

#1


I have just had exactly the same problem with IIS 7.5.

我刚刚遇到与IIS 7.5完全相同的问题。

I tried uninstalling IIS multiple times, changing configuration etc., but nothing seemed to do any difference. I followed all the guides available - still nothing.

我尝试多次卸载IIS,更改配置等,但似乎没有任何区别。我按照所有可用的指南 - 仍然没有。

What I ended up doing, was completely removing IIS and all related files and configuration (except registry settings):

我最终做的是完全删除IIS以及所有相关文件和配置(注册表设置除外):

  • Uninstall IIS via Add/Remove Programs > Turn Windows Features on or off
  • 通过“添加/删除程序”>“打开或关闭Windows功能”来卸载IIS

  • Rebooted
  • Removed the directory including all files: c:\inetpub
  • 删除了包含所有文件的目录:c:\ inetpub

  • Removed the folder inkluding all files: C:\Windows\System32\inetsrv
  • 删除了包含所有文件的文件夹:C:\ Windows \ System32 \ inetsrv

  • Reinstalled IIS via Add/Remove Programs > Turn Windows Features on or off
  • 通过“添加/删除程序”重新安装IIS>打开或关闭Windows功能

Finally it worked. Hope someone else will benefit from this :)

最后它奏效了。希望别人能从中受益:)

#2


I didn't find the origins of the problem. However problem was solved by using Publish Project wizard. Original variant was distributed at xcopy basis with code-behind sources.

我没有找到问题的根源。但是,使用“发布项目”向导解决了问题。原始变体在xcopy基础上与代码隐藏源一起分发。

#3


Looks like its an issue with your browser temporary files. I am assuming you are using Internet Explorer browser in which case try the following:

看起来它是您的浏览器临时文件的问题。我假设您使用的是Internet Explorer浏览器,请尝试以下操作:

Goto Tools->Internet Options. Under 'General' tab, clear the browser history by clicking on 'delete' button.

转到工具 - > Internet选项。在“常规”标签下,点击“删除”按钮清除浏览器历史记录。

#4


I had a similar issue on our QA Server (with the latest changes). Everything was running 100% on the development box but not on QA. Eventually I had to overwrite my QA server with code from Production and then used Beyond Compare to transfer changes file by file and line by line. The error came from the CSS snippet below. I didn't find the reason why but I wrote a work around.

我的QA服务器上有类似的问题(最新的更改)。一切都在开发盒上运行100%但在QA上没有运行。最终,我不得不用生产中的代码覆盖我的QA服务器,然后使用Beyond Compare来逐个文件地逐行传输更改。该错误来自下面的CSS代码段。我没有找到原因,但我写了一个工作。

.dt-action-text {
    font-family: "Helvetica Neue",Helvetica,Arial,sans-serif !important;
    color: #333333 !important;
    margin-left: 5px !important;
}

This was done to override the the parent settings, but didn't work so well.

这样做是为了覆盖父设置,但效果不好。

In short: Check your CSS as well, it might be the culprit.

简而言之:检查你的CSS,它可能是罪魁祸首。