colinramsay.co.uk

IIS Virtual Directory in C# Code

28 Sep 2005

Just a quick on - here's how to create a virtual directory in IIS through C# code.

Update:

A better/different way to do this is documented here. The reason I say that this could be better is that it allows access to the IIS metabase via the DirectoryEntry object.

This means that I can change any of these metabase properties on a virtual directory through C#; for example, which extensions map to which DLLs. And that happens to be exactly what I was looking for :)

Feedback or questions on this post? Create an issue on GitHub.