Allow Health Monitoring Templated Email to work both with IIS Integrated Pipeline and Classic
HttpServerUtility.Execute will corrupt an IIS Integrated HTTP pipeline when fired prior to any actual HTTP request.
When a WAS/ASP.NET 'net' transport WCF service fires a System.Web.WebManagement.WebErrorEvent prior to any HTTP traffic being received by the application, the ASP.NET HTTP pipeline is corrupted and cannot be used to serve HTML until the application is recycled.
This basically means you cannot use the TemplatedMailWebEvent provider for any WAS/ASP.NET application that houses both 'net' bound WCF services and MVC3 or ASP.NET Form web pages.
That's a pity because the TemplatedMailWebEvent provider is a very powerful monitoriing / notification tool for ASP.NET hosters.
This was discussed in MS support case 109102055505235.
This has been the case since IIS7 was released.