Share via


ISAPI Extension Samples

ISAPI extensions work like applications and are accessed by the client just like an ASP page. They are compiled into a DLL and stored in a virtual directory or somewhere else on your Web server. A client can request the ISAPI extension directly, or you can configure your Web server to map files of specific file name extensions to an ISAPI extension and register which verbs are handled.

In this section of the documentation are descriptions of IIS code samples for ISAPI extensions. IIS samples are included in the IIS Software Developer Kit (SDK). You can download the IIS SDK from Platform SDK Update. You can view the SDK at MSDN Online. In the table of contents at MSDN Online, click Web Development, Server Technologies, Internet Information Services (IIS), SDK Documentation, Internet Information Services, Samples.

Samples Description Coding Languages Related Documentation
Simple ISAPI Extension This sample demonstrates how to use the required functions of every ISAPI extension. When learning ISAPI, this is a good place to start. Written in Visual C++ Developing ISAPI Extensions and Filters,

Developing ISAPI Extensions,

Extension Reference, and

ISAPI Reference

Dump IIS Server Variables This sample demonstrates how to access IIS server variables from an ISAPI extension. Server variables provide such information as header values, the application's physical path, authentication information, client information, and so on. Written in Visual C++ Same as for Uppercase Conversion.
Dump Form Data This sample is a Microsoft Internet Server extension, similar to CGI extensions common to many internet servers. It illustrates how to write a DLL that can be used to obtain form data from a web browser, and also how to build a reply to the form. Written in Visual C++ Same as for Uppercase Conversion.
Invoke an Object InvokObjThreads is a sample ISAPI extension to demonstrate invoking a method from an ActiveX Automation Server. This sample creates and uses its own thread pool and work item queue to process the requests, thereby freeing up threads belonging to IIS that would have otherwise been used. Written in Visual C++ Same as for Uppercase Conversion.
Maintain a Keep-Alive Connection This sample demonstrates how to maintain a Keep-Alive connection. Written in Visual C++ Same as for Uppercase Conversion.
Keep-Alive with Worker Threads This sample demonstrates how to maintain a Keep-Alive connection while using worker threads in an ISAPI dll. Written in Visual C++ Same as for Uppercase Conversion.
Redirect a Request Redirect is a sample ISAPI extension to demonstrate redirecting a request. Written in Visual C++ Same as for Uppercase Conversion.
Create a Thread Pool This sample demonstrates how to create and manage a worker thread pool to handle requests to this ISAPI extension so that the IIS thread pool is not depleted. This can be useful if your ISAPI takes a long time to process. Written in Visual C++ Same as for Uppercase Conversion.
Input/Output Operations This readme file is for all of the ISAPI I/O samples. These samples illustrate the different ways to handle I/O within an ISAPI extension. The Asynchronous Read sample demonstrates asynchronous ReadClient functionality in the ISAPI interface. The Asynchronous Trans sample demonstrates asynchronous TransmitFile functionality in the ISAPI interface. The Asynchronous Write sample demonstrate asynchronous WriteClient functionality in the ISAPI interface. The Synchronous Read sample demonstrates synchronous ReadClient functionality in the ISAPI interface. The Synchronous Write sample demonstrate synchronous WriteClient functionality in the ISAPI interface. Written in Visual C++ Same as for Uppercase Conversion.
Transferring Data in Encoded Chunks This sample takes a file specified in a query string and sends it to the client in peices using chunked transfer encoding. If no query string is present, or if the query string does not identify a readable file, the sample returns a plain text page describing its usage. Written in Visual C++ Same as for Uppercase Conversion.

important Important These samples are provided for educational purposes only. They are not intended to be used in a production environment, have not been tested in a production environment, and Microsoft does not provide technical support for them.