Why are blank pages being served with “200 OK” for asp.net errors in IIS 8.5 (Win 2012 R2)?

南楼画角 提交于 2019-11-30 11:32:53

Had a similar issue on 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".

You need to ensure Server Side Debugging is not enabled in the ASP module.

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.

Make sure that you are not calling Server.ClearError() in Application_Error of Global.asax.cs that ended up being my problem.

Ripping out all Global.asax code helped me to find the cause of the error.

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.

Maybe this case helps you.

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.

In this case it worked to switch the Application pool's managed pipeline mode from integrated to classic.

Make sure you have enabled HTTP Activation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!