Disabling ASP Exception Handling to Debug COM Components in IIS

IIS 6.0

When debugging a COM component that is called from an ASP page, it is helpful to disable ASP exception handling in order to debug the COM component from the development environment.

The following error is caused by an access violation in a component process.

ASP 0115 
Unexpected error  
A trappable error occurred in an external object. The script cannot continue running.  

The reason ASP is able to display a message after faults like this is because the crash is detected by the built-in exception handling of the ASP process. With IIS 5.1, it is possible to run an ASP application in an isolated process. The extra overhead in system resources required to do this may be worth the added security of knowing a crash will not affect other applications.

When you are debugging an application component, however, it is often easier to detect where faults occur when exception handling is disabled. You can disable exception handling from the Process Options page of the ASP configuration property sheets. However, the page only appears when you are editing a process level application. This happens:

  • When the application has been marked as isolated (in its own process), or

  • When editing the master-level properties, which affects all the in-process applications as well.

When you deselect the Enable debug exception handling check box on the Process Options property page, serious application errors will not be captured by ASP. Instead, they will appear as faults in the application process and components running in the same process.

Show: