Provisioning a New Website

When you provision new websites, you often need to create a new virtual directory. The Configuration API doesn’t provide you with any help here; however, you can create new virtual directories (and applications) by taking advantage of the classes in the System.DirectoryServices namespace. These classes enable you to use Active Directory Services Interface (ADSI) to modify properties of Internet Information Server.

Note

You can also manipulate Internet Information Server properties by using Windows Management Instrumentation (WMI). For more information, see the topic “Using WMI to Configure IIS” at the Microsoft MSDN website (msdn.microsoft.com).

Before you can use the classes from the System.DirectoryServices namespace, ...

Get ASP.NET 4 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.