ISAPI: Comparing IIS and Forefront TMG

The Forefront TMG Web proxy supports the Web filter extensibility model, so that third-party developers can examine and change the HTTP request-and-response flow by using Web filters. ISAPI extensions are not supported.

The Web proxy manages communication with clients, and therefore does not rely on Internet Information Services (IIS). The Web proxy provides the functions that are necessary for the implementation of Web filters. Web filters developed for IIS will generally require few changes to work with the Forefront TMG Web proxy because the APIs are similar.

There are several important differences between ISAPI support in IIS and Web filters in Forefront TMG.


Web filters for IIS (ISAPI filters) are typically installed on a Web server. Web filters for Forefront TMG are installed on a Forefront TMG computer (or an array of Forefront TMG computers), between the Web server and the Web client, and act as conduits for requests to all external and internal sites. There is no local site or content, and no direct access to Web server files.


Support for general ISAPI functions, server support functions, and notification-specific functions in Forefront TMG differs slightly from IIS. The following table compares support for ISAPI functions in IIS and in Forefront TMG.

Function or notification Task Forefront TMG support IIS support
GetServerVariable Yes. Not all variables are supported. Forefront TMG provides some variables that are not provided by IIS.
AddResponseHeaders Yes. Headers are added by AddResponseHeaders only for responses generated by Forefront TMG, where SEND_RESPONSE is triggered. Use SEND_RAW_DATA to add headers to all responses. Yes.
WriteClient Yes. Yes.
AllocMem Yes. Yes.
ServerSupportFunction SF_REQ_ADD_HEADERS_ON_DENIAL Yes. Yes.
SF_REQ_GET_CONNID Returns 0. Supported by versions earlier than IIS 4.0; otherwise, returns 0.


Returns 0. Yes.
SF_REQ_SET_NEXT_READ_SIZE Not relevant to the implementation of ISAPI in Forefront TMG. Provided for compatibility with IIS. If you use it in a Forefront TMG Web filter, you should not assume that the number of bytes read during the subsequent read operation will not exceed the value set in the ul1 parameter. Yes.
SF_NOTIFY_SEND_RESPONSE Not used when the Web proxy sends a response. Used when a filter generates a response using the SF_REQ_SEND_RESPONSE_HEADERS server support function. Yes.


Administration, setup, and registration are significantly different in Forefront TMG. For specific information and procedures, see Web Filter Setup.

The Forefront TMG Web proxy uses the Forefront TMG administration COM objects to store and retrieve filter configuration information.

Note  Web filters developed for Microsoft Proxy Server 2.0 are not binary-compatible with Forefront TMG because of new notifications, setup requirements, and storage functionality.

Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.