I have an application implemented as an ISAPI filter whose behavior needs to be changed depending on whether it is loading ISA or IIS. During GetFilterVersion, it must register for SF_NOTIFY_SEND_RAW_DATA if it is loaded by ISA or SF_NOTIFY_SEND_RESPONSE if it is loaded by IIS.
There seems to be no information about the server passed to GetFilterVersion. Are there any tricks that can identify and distinguish between IIS and ISA?
[edit]
An application needs to know which server loads it during initialization during a GetFilterVersion call. There is no current request, so trying to get SERVER_VARIABLE from header variables will not work; There are no header variables at this point.
To develop, my application sets response headers such as cookies and cache control headers. When starting in the context of the ISA server, to perform this operation, you must use the SF_NOTIFY_SEND_RAW_DATA event, changing the initial data sent by the ISA proxy server. However, in IIS, using this notification is associated with a serious performance hit, so the application must use SF_NOTIFY_SEND_RESPONSE. SF_NOTIFY_SEND_RESPONSE will not work with ISA, because this event is not triggered for proxied responses, only for responses that originate from ISA itself, such as error pages. Finally, event logging occurs once during GetFilterVersion () and cannot be changed after loading the filter.
, SF_NOTIFY_SEND_RESPONSE SF_NOTIFY_SEND_RAW_DATA, , IIS ISA.