IIS 7.5 Classic ASP Handling Non-IIS 6 Errors

We are in the process of migrating an ASP Classic / ASP.NET application from IIS 6 to IIS 7.5. Most of them work fine in classic mode, but we have a lot of problems with how IIS 7.5 errors are handled. We report errors using the classic ASP page, where we capture the error information here, and then redirect the page to display the error. Based on our testing, Server.GetLastError and Request.ServerVariables("SCRIPT_NAME") do not return error information and the source when accessed from the logging page. Are there any other ways to get error information in IIS 7.5 or register?

In case this helps, using freb, we noticed that IIS seems to generate a completely new request, then it starts to handle our error capture.

Thanks in advance.

+4
source share
1 answer

@smaclell: see http://dylanbeattie.blogspot.com/2008/12/fun-with-servergetlasterror-in-classic.html for a potential solution for you.

Here is the relevant paragraph from the article:

Vista had a very similar known bug that was supposedly fixed in SP1, but it seems that the same patch is not part of Windows 2008 Server yet. However, there is a workaround - if you set the default error property (in IIS settings → Error pages → Change Function settings ...) to the user page, IIS will call this page whenever the error is not processed by the explicitly configured status code handler (so that your 404 handlers, etc. will still work) - but for some reason error handling in this way means Server.GetLastError () still works correctly.

+3
source

All Articles