This problem was the most infuriating and time consuming problem that I’ve ever dealt with. The first part of this post might be a bit of rambling, so if you want to jump to the details, just click here.
I noticed the first symptoms when I couldn’t debug a web site from within Visual Studio 2010. The below error was being shown when the local development web server was trying to load.
WebDev.WebServer40.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
I initially thought it was a bug in Visual Studio or the .NET Framework, so I verified all of the patches and services packs. After downloading and installing the Cassini development web server replacement for the default Visual Studio web server, I continued to get the same error.
The system event logs showed two error occurring relating to the vshost.exe process.
Framework Version: v4.0.30319
Description: The process was terminated due to an internal error in the .NET Runtime at IP 791A8BBD (79140000) with exit code 80131506.
Faulting application MyWebSite.vshost.exe, version 10.0.30319.1, stamp 4ba2084b, faulting module clr.dll, version 4.0.30319.1, stamp 4ba1d9ef, debug? 0, fault address 0x00068bbd.