November 2010 (1)
August 2010 (1)
July 2010 (1)
June 2010 (3)
July 2009 (3)
June 2009 (1)
May 2009 (1)
February 2009 (1)
January 2009 (1)
November 2008 (3)
October 2008 (4)
September 2008 (9)
August 2008 (6)
July 2008 (3)
June 2008 (3)
January 2008 (1)
November 2007 (2)
October 2007 (6)
September 2007 (5)
August 2007 (22)
July 2007 (6)
June 2007 (1)
May 2007 (3)
April 2007 (27)
March 2007 (8)
February 2007 (6)
September 2006 (2)
August 2006 (4)
July 2006 (9)
June 2006 (17)
May 2006 (20)
April 2006 (12)
March 2006 (9)
February 2006 (4)
January 2006 (3)
December 2005 (2)
November 2005 (4)
October 2005 (5)
September 2005 (37)
August 2005 (83)
July 2005 (6)

Active Directory / LDAP (0)
ASP.Net (19)
Blackberry Development (4)
c# (34)
c++ (3)
Code Camp (1)
Excel (1)
Exchange (3)
Front Page 2003 (6)
FTP User Editor (4)
IIS (146)
IIS - Log Parser (7)
IIS / FTP (12)
IIS / Tools / Administration (42)
IIS / Tools / Authentication (6)
IIS / Tools / Compression (8)
IIS / Tools / Crash & Hang (12)
IIS / Tools / ISAPI Filters (17)
IIS / Tools / Log Files (17)
IIS / Tools / Scripts (28)
IIS / Tools / Security (9)
IIS / Tools / SSL (6)
IIS 7 (3)
Internet Information Server (1)
Me (Chris Crowe) (6)
MIME Types (1)
Misc (72)
Oulook Express (2)
Silverlight (1)
SQL Server (27)
SQL Server CTE (1)
Vista (15)
Vista Gadgets (8)
Visual Studio (11)
Voice over BroadBand (1)
Windows (33)
Windows Powershell (3)
Windows Sharepoint Services (0)
Windows Sharepoint Services (15)
Windows Vista (14)
Wine Cellar (1)
WMI (8)


March 2006 (9)

IIS Directory Browsing

IIS supports a directory browsing mode where you can view a list of files and directories instead of viewing an HTML page.

This is very useful for example when you have a lot of files and folders such as an MP3 collection.

To enable this mode you select either a Physical or Virtual directory in the Internet Information Services application and select properties and then select the Directory Browsing check box as shown below.

Once you enable this option when you browse to the directory or any child directories they will be shown using the built in directory browsing module.

In the above view there is a single file and a single directory displayed, and they map to the following physical directory which is the home directory for the web site; in this case c:\inetpub\websites\directorybrowsing

Hiding Files

If you have some files in your directory that you do not want the user to see you must mark them as Hidden using the Windows Explorer file properties dialog.

Note: If you mark the file as hidden even if you know the name of the file you can not download the file (an HTTP 404 error will be produced)

Why do my Virtual Directories not show up in the browse list?

In the example above we have a virtual directory called Music which is pointing to e:\music (directory browsing has been enabled for the Web Site Root and also for the Music Virtual directory)

When you browse the web site you do not see the Music Virtual directory.

This is a special case where IIS does not show the virtual directory but if you knew the name of the virtual directory and manually entered it into the address bar you would see the files as shown below.

The way to make sure your users can see the virtual directory while they are browsing the root is to create a physical directory with the same name in the physical folder of the parent directory.

So in our case our parent directory points to c:\inetpub\websites\directorybrowsing so we must create a folder called Music in the c:\inetpub\websites\DirectoryBrowsing folder.

Nothing has to exist in this new empty Music directory and as soon as you create the folder and refresh the listing you will see the directory shown in the web browser and you have the ability to navigate into it as we would any other directory.

Applying your own style to the directory listing

You can't.....

Excel Password Remover

Have you ever forgotten your Excel workbook or sheet password? This program will remove passwords of any length, also passwords containing special characters.

You can download the file from:


ISAPI Filter - LeechBlocker by Michael R. Brumm

LeechBlocker is an open source ISAPI Filter for Microsoft's Internet Information Services

The filter intercepts all incoming requests and checks to see if the resource (an image for example) is being referred to by the same site by which it is being hosted. If the referrer is not the same as the site name, the filter checks to see if the extension of the resource requested is an image (.gif, .jpg, .jpeg, etc...). If the extension indicates that the resource is an image, then the request is denied.

You can download the DLL and/or the full source code in C++ for the ISAPI filter

IIS Applications - don't remove it from the Root of your web site....

IIS Applications

An IIS application is any file that is executed within a defined set of directories in your Web site. When you create an application, you use the Internet Information Services snap-in to designate the application's starting-point directory (also called an application root) in your Web site. Every file and directory under the starting-point directory in your Web site is considered part of the application until another starting-point directory is found. You thus use directory boundaries to define the scope of an application.

If you remove the IIS Application from the web site properties dialog you will find that you can not connect to your web site at all and you will not get any errors and trying to identify the problem could be quite difficult.

Using a packet sniffer I received the following information when I made a request to my web site:


If you open IE 6 and enter the URL the following will be displayed.


If you then click refresh IE just sits there in an endless loop....


  • Nothing is logged in the Web Site Log file
  • Nothing is logged in the Event Log
  • Nothing is logged in the HTTPERR log file

Obviously the fix is to recreate the IIS Application by simply clicking on the Create button on the Home Directory tab. 

As soon as you do this your web site will work again, but this could be something that could catch someone out.

An interesting side affect of this is if you then create a virtual directory (make sure the IIS Application is created for the Virtual Directory, but not the root) you can access the virtual directory but not the root of the site. Is this security by obsecurity?

IIS 6 - Downloads being terminated by HTTP.SYS

At work we came across a situation on a Windows 2003 Server IIS 6 machine where people downloading one specific file were finding that it was being terminated during the transfer. Those people who had file download managers or web browsers with resume did not notice the problem but Internet Explorer would just terminate the download.

  • This Windows 2003 Server machine did not have Service Pack 1 installed
  • The particular download was approx 20MB.

This machine was located in the United States and users in the United States did not notice and could not reproduce the problem.

In the httperr.log file in c:\windows\system32\logfiles\HTTPERR we would find entries like the following

date time c-ip s-ip c-port cs-version cs-method cs-uri sc-status s-siteid s-reason
2006-02-22 5:52:53     80 HTTP/1.1 GET - DataTransfer120/DataTransfer120.exe - 19499532 Timer_MinBytesPerSecond

The reason given for the termination of the download was Timer_MinBytesPerSecond which Microsoft states as the following

  • The connection expired because the client was not receiving a response at a reasonable speed.
  • The response send rate was slower than the default of 240 bytes/sec.

The strange thing was we were getting around 30KB/S and then the download would terminate so we were getting a faster response than 240 bytes per second.

The fix

The fix to the problem was to install Service Pack 1 for Windows 2003 Server. I received a response from a Microsoft employee that stated "There are many bugs in http.sys timeout logic fixed in SP1 - one bug regarding send-size being more than 15270*MinBytesPerSecond - this was not released as a qfe, your only option is to upgrade to SP1."

Installing Service Pack 1 has indeed cured this problem....

Additional References

FTP User Editor for Active Directory (Updated)

The FTP User Editor for Microsoft Active Directory has been updated a fix a couple of problems.


  • There was a limit of 1000 objects being returned from the Active Directory - increased to 32768. 

You can download and install from:

For more details on the FTP User Editor please see the original post at

Internet Information Services (IIS) 6.0 Manager for Windows XP (not saving added servers)


With IIS 6.0 Manager for Windows XP, administrators can remotely manage an IIS 6.0 server from a Windows XP Professional workstation. This tool only installs a snap-in for Microsoft Management Console and its associated DLLs and documentation; it does not install the complete IIS 6.0 server on your local computer.
  • This tool is available only in English. When installed on non-English editions of Windows XP, IIS 6.0 Manager, documentation, folders, and shortcuts appear as English-only.
  • After installation, IIS 6.0 Manager and IIS 5.1 Manager coexist in separate directories on the same computer.

  • Start the IIS 6.0 Manager after installation from the administrative tools folder in the Control Panel, not from the Computer Management console. If the IIS 5.1 Manager is also installed, it will appear in the Computer Management console, not the IIS 6.0 Manager.



In general the IIS 6 Manager for XP works well but you will find that every time you open it it shows you your local XP's IIS configuration and if you have added an IIS 6 Server and then closed the Manager your settings are lost when you reload.

The way around this problem is to perform the following:

  • Select Start-Run
  • Enter "MMC" and hit Enter
  • Click the "File" menu and select "Add/Remove Snap-in"
  • Click the "Add" button
  • Scroll down the list and select "Internet Information Services (IIS6) Manager" and click Add
  • Click Close
  • Click OK
  • Right click on "Internet Information Services (IIS6) Manager" under the Console Root node and select "Connect"
  • Enter the name of your IIS6 machine (use "Connect as" if needed)
  • Select "File - Save As..." and browse to "c:\document and settings\All Users\Start Menu\Programs\Administrative Tools"
  • Enter "Internet Information Services (MINE)" and click Save
  • Click File - Exit

Now you should find the new menu item "Internet Information Services (MINE)" under Administrative Tools.

When you load it you will find that it contains the local machine and the remote machine's details that you added.

You can keep adding other machines to this configuration - just remember to click File-Save and you settings will be saved.

FTP User Editor for Microsoft Active Directory (Updated)

The FTP User Editor for Microsoft Active Directory has been updated a fix a couple of problems.


  • The connect dialog did not hide the password as you typed it!
  • The Recent Users were lost after you shutdown due to a difference in implementation between the old and new controls.

New Features

  • You can now browse to find the path for the FTP Root directory.

You can download and install from:

For more details on the FTP User Editor please see the original post at

COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

If you add a reference to Microsoft Excel and then try to use it within your ASP.NET application you may receive the following error.

Server Error in '/excel' Application.

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

Example Application

The problem is that by default Microsoft Excel as a COM object can only activated by the following accounts:

  • Administrator
  • System
  • Interactive

When you are running your ASP.Net account on Windows XP your web application is running as the ASPNET account.

The way to resolve this issue is to edit the DCOM configuration settings for the Microsoft Excel Application object.

Configure DCOM

  • Go to the Start-Run menu item.
  • Type in "DCOMCNFG" and hit enter.
  • This should load the "Component Services" MMC (you can also load from Administrative Tools - Component Services"
  • Expand "Component Services"
  • Expand "Computers"
  • Expand "My Computer"
  • Select the "DCOM Config" item
  • Select the "Microsoft Excel Application" item.
  • Right click and select Properties
  • Select the Security Tab and you should see the following:

  • Under "Launch and Activation Permissions" select the "Customize" option.
  • Click the "Edit" button

    Windows XP


    Windows 2003 Server


  • Click the "Add" button to add a new account to the list.
  • On the dialog that is displayed click the Locations button

    (this is because by default your domain will be selected and we need a local account)

    In this dialog scroll the list to the top (sometimes the first item is not visible) but scroll to the top and select the first item which is your computer name. In the list below "CCROWE" is the name of my computer.

  • Click the OK button
  • On the dialog that is displayed enter "ASPNET" as the account name (make sure location is set to the name of the computer that IIS is on) on Windows XP or if you are running on Windows 2003 Server you must enter the account that the Application Pool is running as, by default "Network Service"

    Windows XP


    Windows 2003 Server

    Note: A quicker way on Windows XP is to just enter the computer name and the account
    so in my case that would be:



  • Click the OK button
  • Now make sure you select the following options for the "ASP.NET Machine Account" or the account that is the application pool identity ( by default Network Service)
    • Local Launch         : Allow
    • Remote Launch        : [blank]
    • Local Activation     : Allow
    • Remote Activation    : [blank]

    These settings can be seen below:


    Windows XP


    Windows 2003 Server

  • Click the OK button and test your web application again and it should work fine.

Note: Remember if you are running on Windows 2003 Server you must use the application pool identity as the account and not the ASPNET account.