I've set up a new Windows 2012 R2 server running IIS 8.5.
我设置了一个新的Windows 2012 R2服务器,运行IIS 8.5。
We noticed that when an error occurs (eg the ASP.NET State Service was not running) that instead of outputting a 500 status code error screen, the request actually returns a totally blank page (only headers - with no content). We obviously need to see the errors and serving 200 OK for an error could be very problematic for indexers like Google etc or any wesite monitoring tools (which would not notify us that the site had gone offline).
我们注意到当发生错误时(如ASP)。NET状态服务没有运行),请求没有输出500状态码错误屏幕,而是返回一个完全空白的页面(只有页眉——没有内容)。显然,我们需要看到错误并为一个错误提供200 OK服务,对于谷歌等索引器或任何wesite监视工具(这些工具不会通知我们站点已经脱机)来说,可能会有很大的问题。
On our other servers (IIS 7) we see the "yellow error screen" with a message like "could not connect to state server" (or similar).
在我们的其他服务器(IIS 7)上,我们看到“黄色错误屏幕”,其中有一条类似“无法连接到状态服务器”(或类似)的消息。
What could possibly be wrong here? Is there some setting to globablly disable all errors (but this would be stupid if it also serves the 200 status code) or could something else be getting in the way?
这里可能有什么问题?是否有一些设置可以全局禁用所有错误(但是如果它也服务于200个状态码,那么这将是愚蠢的),或者可能有其他什么东西阻碍了它?
The only other thing which could be interfering is we've got ISAPI_Rewrite installed on the server (but this doesn't usually cause this problem).
唯一可能造成干扰的是,我们在服务器上安装了ISAPI_Rewrite(但这通常不会导致这个问题)。
Thanks!
谢谢!
5 个解决方案
#1
20
Had a similar issue on Windows 8.
Windows 8也有类似的问题。
In settings search for "Turn Windows features on or off".
在设置中搜索“打开或关闭窗口功能”。
Check that the following features are enabled
检查是否启用了以下特性。
"/Internet Information Services/World Wide Web Services/Common HTTP Features/HTTP Errors". "/Internet Information Services/World Wide Web Services/Common HTTP Features/Static Content".
“/互联网信息服务/万维网服务/公共HTTP特性/HTTP错误”。“/互联网信息服务/万维网服务/普通HTTP特性/静态内容”。
#2
5
You need to ensure Server Side Debugging is not enabled in the ASP module.
您需要确保在ASP模块中没有启用服务器端调试。
Classic ASP server 500 errors are returned as 200's. An attempt is made at opening the Server Side Debug Application, that then can't be found and IIS subsequently returns a 200 response and a blank page.
经典的ASP服务器500错误被退回到200。尝试打开服务器端调试应用程序,然后无法找到该应用程序,IIS随后返回200个响应和一个空白页。
#3
3
Ripping out all Global.asax code helped me to find the cause of the error.
撕掉所有全球。asax代码帮助我找到了错误的原因。
After that, the IIS started to return the error page as expected. Then, after the fix is applied, I returned the Global.asax code back.
之后,IIS开始按预期返回错误页面。然后,在应用修复之后,我返回了全局。asax代码。
Maybe this case helps you.
也许这个案子对你有帮助。
#4
3
Make sure that you are not calling Server.ClearError() in Application_Error of Global.asax.cs that ended up being my problem.
确保没有在Global.asax的Application_Error中调用Server.ClearError()。cs最终成了我的问题。
#5
1
I had a similar issue when requesting the Default.aspx (set as page default in directory). The Server returned status 200, but the Content was blank.
我在请求默认时遇到了类似的问题。aspx(在目录中设置为页面默认值)。服务器返回状态200,但内容为空。
In this case it worked to switch the Application pool's managed pipeline mode from integrated to classic.
在本例中,它将应用程序池的托管管道模式从集成模式切换到经典模式。
#1
20
Had a similar issue on Windows 8.
Windows 8也有类似的问题。
In settings search for "Turn Windows features on or off".
在设置中搜索“打开或关闭窗口功能”。
Check that the following features are enabled
检查是否启用了以下特性。
"/Internet Information Services/World Wide Web Services/Common HTTP Features/HTTP Errors". "/Internet Information Services/World Wide Web Services/Common HTTP Features/Static Content".
“/互联网信息服务/万维网服务/公共HTTP特性/HTTP错误”。“/互联网信息服务/万维网服务/普通HTTP特性/静态内容”。
#2
5
You need to ensure Server Side Debugging is not enabled in the ASP module.
您需要确保在ASP模块中没有启用服务器端调试。
Classic ASP server 500 errors are returned as 200's. An attempt is made at opening the Server Side Debug Application, that then can't be found and IIS subsequently returns a 200 response and a blank page.
经典的ASP服务器500错误被退回到200。尝试打开服务器端调试应用程序,然后无法找到该应用程序,IIS随后返回200个响应和一个空白页。
#3
3
Ripping out all Global.asax code helped me to find the cause of the error.
撕掉所有全球。asax代码帮助我找到了错误的原因。
After that, the IIS started to return the error page as expected. Then, after the fix is applied, I returned the Global.asax code back.
之后,IIS开始按预期返回错误页面。然后,在应用修复之后,我返回了全局。asax代码。
Maybe this case helps you.
也许这个案子对你有帮助。
#4
3
Make sure that you are not calling Server.ClearError() in Application_Error of Global.asax.cs that ended up being my problem.
确保没有在Global.asax的Application_Error中调用Server.ClearError()。cs最终成了我的问题。
#5
1
I had a similar issue when requesting the Default.aspx (set as page default in directory). The Server returned status 200, but the Content was blank.
我在请求默认时遇到了类似的问题。aspx(在目录中设置为页面默认值)。服务器返回状态200,但内容为空。
In this case it worked to switch the Application pool's managed pipeline mode from integrated to classic.
在本例中,它将应用程序池的托管管道模式从集成模式切换到经典模式。