Help with handling errors. - 07-06-2010 , 07:48 PM
I have implemented an error handling httpmodule similar to the one
If I run the application locally through the Visual Studio Development
Server everything works as expected. On the live server I have IIS
setup in the Aplication Configuration so that there are no ISAPI
extensions and with the wildcard mappings go to the dotnet dll, and I
have the checkbox to "Verify that the file exists" turned off.
In my web.config I have the following:
<customErrors mode="RemoteOnly" defaultRedirect="~/_errors/500-
<error statusCode="403" redirect="~/_errors/403-forbidden.aspx"/
type="tmpw.applicationname.App_Code.HttpErrorModul e, applicationname" /
And under IIS errors I have it set up so that 404 errors go to the
same 404 URL in web.config.
The behavior I am expecting is that if I go to appliationname.com/
xyz.html and it does not exist, it is kicked into the error handling
code. The error handling module is set up to log the event and I
should get an email. And even failing that the 404 page should still
load in IIS settings.
The error handling code does kick in if I go to appliationname.com/
xyz.aspx - a page which does not exist. But for any other file
extension I do not get the expected result.
Heres what happens. The application starts as expected and the code I
have in Application_BeginRequest in global.asax does get called. But
at the end of that block it stops processing. It never makes it to the
http module code. Instead I get a "The request is not supported."
The application I am working on is a migration of older code. I want
to be alerted to every 404 that comes through the application so that
I can see if we missed anything. I could potentially get this sort of
information from the IIS logs I suppose but I really shouldn't have
to. Does anyone have any idea why I get a "Request Not Supported"
error when processing an HTML page, and more so, why I only get it
when running the application through IIS and not through Visual
BTW - if this isn't the right dotnet board to post on, please point me
to the right place.
|Thread Tools||Search this Thread|