Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


April 2000

Using ISAPI Filters

RSS
Subscribe to Windows Web Solutions | See More Microsoft Management Console (MMC) Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

[Editor's Note: Email your IIS-related solutions (400 words or less) to R2R at iisadmin@win2000mag.com. We'll edit submissions for style, grammar, and length. If we print your contribution, you'll get $100.]

Conversations about Internet Server API (ISAPI) usually include the word extension or filter. Extensions and filters differ from each other. Extensions have become virtually obsolete, thanks to advances in Active Server Pages (ASP) technology, but you can't replace ISAPI filters.

ISAPI filters literally filter each HTTP request to IIS. As a developer, you can capture specific events from IIS and pre- or postprocess the results. For example, if I want to create a customized log for every Web request, I can capture each HTTP request and log the information to a text file or database; I can further extend the log to include specific information from the Active Directory (AD) for the authenticated user. Or if I need to authenticate against a legacy database, I can capture the authentication event and perform the appropriate actions. All I'm doing is extending the functionality of IIS.

However, ISAPI filters have their drawbacks. A filter is invoked for every HTTP request, so you must be careful that you design the filter properly. Making sure you allocate and deallocate memory correctly is crucial. If you've failed to deallocate even one byte, each HTTP request will cause IIS to consume an additional byte of memory. Also, if the ISAPI filter is flawed, it can prevent IIS from servicing all HTTP requests.

Setting up ISAPI filters through the Microsoft Management Console (MMC) is simple. Right-click the Web site instance on which you want to install the ISAPI filter, then select Properties. Click the ISAPI Filters tab. You'll see three columns of information labeled Status, Filter Name, and Priority, respectively. The status will be green if IIS was able to load the ISAPI filter. Priority refers to the order in which ISAPI filters execute, which is especially important for ISAPI filters that process the same events. Filters with the same priority process sequentially in the order in which they appear. If you want an ISAPI filter to process across all Web site instances, you can add the filter to the master properties of the WWW Service. To add a filter to the master properties, right-click the machine name within the MMC. Select the properties item and the properties dialog for the entire Web server launch. Select WWW Service from the Master Properties drop-down list, then click Edit. You'll see a dialog box similar to the properties of a single Web site.

End of Article



Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 24, 2008

An often irreverent look at some of the week's other news, including a Vista Capable dismissal request, Zune price reductions, Morrow musings, Novell and Microsoft sitting in a tree ... two years later, Yahoo!, IE 6 on Windows Mobile, and so much more ...


Security Whitepapers The Impact of Messaging and Web Threats

Why SaaS is the Right Solution for Log Management

Protecting (You and) Your Data with Exchange Server 2007

Related Events Top 10 Email Security Challenges and Solutions

Introduction to Identity Lifecycle Manager "2"

Delivering Reliable and Effective Web-Based Applications

Check out our list of Free Email Newsletters!

Security eBooks Spam Fighting and Email Security for the 21st Century

Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

Related Security Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing