Our software development team recently encountered a problem debugging in Visual Studio. When they start the debug session, the browser session shows a blank page.

IE Blank page

We researched registry settings, Visual Studio settings, web.config, IIS Express settings, malware, IE settings, Chrome settings, and many other factors without success.

If you view the source on the blank page, you will see:

IEBlankpageViewSource

<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
<HTML><HEAD>
<META http-equiv=”Content-Type”
content=”text/html; charset=windows-1252″></HEAD>
<BODY></BODY></HTML>

Specified things we checked:
We verified that debugging was present in web.config:
<compilation debug=”true” strict=”false” explicit=”true” targetFramework=”4.0″/>

We verified our .net framework was installed correctly. It was in place as we expected.

We checked the Visual Studuio Tools->Options->Debugging->Enable Just My Code setting, but no luck.

We looked for web proxy settings such as Fiddler, but they were not present.

We did see an error “A first chance exception of type ‘System.UnauthorizedAccessException’ occurred in mscorlib.dll” but didn’t find any permission issues.

Solution:
In the end we discovered that the problem was caused by an app_offline.htm file. For some reason, the app_offline content does not render properly and the page is presented with blank content. This can occur in a project written in C# or VB.

We suspect that the UnauthorizedAccessException is the reason that the app_offline.htm content did not render, but don’t have any evidence of this.

Visual Studio app_offline_htm