H
Howard Hoffman
We've an ASP.NET 2.0 application that we're migrating to IIS7 and W2K8.
We have application that makes heavy use of the
System.Web.Management.WebErrorEvent type to Raise() errors to the configured
ASP.NET health monitoring providers. This has proven to be a good solution
for us over the 3 years the application has been in production.
Our application has logic that fires in the Global.asax Application_Start
event, and that logic also uses the WebErrorEvent type to Raise error
events. This does not work in IIS7 for an Integrated applcation.
In my view, this is a fixable limitation that MS should address and release
as a patch.
The issue is that System.Web.Management.WebRequestInformation class (it is
marked Internal according to Reflector) makes an illegal (when called in the
context of an Application_Start event) call to HttpContext.Current.Request.
Ironically, the WebRequestInformation class does already handle the case
where HttpContext.Current is null, and proceeeds normally after that point.
What happens is that our application only cannot Raise WebErrors
appropriately within Application_Start.
In our case, we're using 3 Providers:
Event Log Provider
SQL Web Event Provider
Templated Mail Web Event Provider
I'm looks to me (again, via Reflector) that all 3 would work just fine
without a live HttpContext.Current.Request.
What is Microsoft's plan for updating System.Web.Management to work in this
case? What is a recommended practice that developers should follow here?
Thanks in advance,
Howard Hoffman
We have application that makes heavy use of the
System.Web.Management.WebErrorEvent type to Raise() errors to the configured
ASP.NET health monitoring providers. This has proven to be a good solution
for us over the 3 years the application has been in production.
Our application has logic that fires in the Global.asax Application_Start
event, and that logic also uses the WebErrorEvent type to Raise error
events. This does not work in IIS7 for an Integrated applcation.
In my view, this is a fixable limitation that MS should address and release
as a patch.
The issue is that System.Web.Management.WebRequestInformation class (it is
marked Internal according to Reflector) makes an illegal (when called in the
context of an Application_Start event) call to HttpContext.Current.Request.
Ironically, the WebRequestInformation class does already handle the case
where HttpContext.Current is null, and proceeeds normally after that point.
What happens is that our application only cannot Raise WebErrors
appropriately within Application_Start.
In our case, we're using 3 Providers:
Event Log Provider
SQL Web Event Provider
Templated Mail Web Event Provider
I'm looks to me (again, via Reflector) that all 3 would work just fine
without a live HttpContext.Current.Request.
What is Microsoft's plan for updating System.Web.Management to work in this
case? What is a recommended practice that developers should follow here?
Thanks in advance,
Howard Hoffman