Can ISAPI Filters run in a separate process space?

Programs written to work with a Web server have specific requirements. You can’t, for example, invoke an instance of Notepad.exe from a URL and expect to see a Notepad window on the client system. In order for an executable (that is not CGI) to interact with requests from IIS, it needs to be written using ISAPI. ISAPI stands for Internet Server Application Programming Interface. There are two kinds of ISAPI executables: extensions and filters.


ISAPI extensions can be invoked directly from a URL such as http://localhost/myisapi.dll. Assuming you have IIS configured to permit scripts and executables on the directory and the user has the Execute NTFS permission, the dll will run. IIS allows you to specify if the application will run in process (as part of Inetinfo) or out of process (as part of MTX on IIS 4.0, or dllhost as part of IIS 5.x). When an application is run out of process, Inetinfo is insulated from problems. If the application fails, so does the Web server.


ISAPI filters are another matter altogether. ISAPI filters are able to modify the incoming and outgoing data stream to and from IIS. As a result they have a great deal of power and can be used to implement custom logging, authentication, or modify the data stream. Features implemented in ISAPI filters for IIS 5.0 include data compression, digest authentication, and URLScan.


Because filters play such a central role with IIS, they are, by design, always run in process as part of Inetinfo. Consequently, proper ISAPI filter construction is essential to server health. You may wish to work with Microsoft Product Support Services to identify the problem, as troubleshooting exceptions of this sort can be quite a challenge.


There are a couple of new technologies that may make life easier in this regard, and IIS 6.0 is one of them. Due to it’s new architecture, all ISAPI filters run out of process. This will insulate the Web server from a wayward ISAPI filter, but does not actually solve the problem. Toward that end, consider what the .NET languages may be able to do in terms of ISAPI filters. Implementing equivalent functionality with .NET is simplified significantly over standard ISAPI Filter design with C++.

Your rating: None Average: 4 (1 vote)