Fix for memory leak that happens when using the IIS ADSI provider

I’ve just finished helping on a case where a fairly simple usage scenario for the IIS ADSI provider ran into a memory leak.  A lot of the time this would not matter as the ADSI programming interface to IIS is often used from short lived scripting clients so a memory leak may not even be noticed, let alone be a problem. However in this case my customer was using it from an application that ran 24x7 to monitor IIS configuration so the leak became very apparent after a fairly short time.

As a result, we now have a new hotfix generally available for the Windows 7 and Windows Server 2008 R2 platforms:

FIX: Memory leak when the IIS ADSI provider retrieves some metabase properties in IIS 7.5

The article gives a simple code sample that demonstrates the leak. Essentially all you have to do is bind to a virtual directory object and enumerate all its properties.

HTH

Doug