This class allows manipulation of virtual directories. Basically it allows creation or modification of a virtual directory.

The class uses DirectoryServices to perform this task and the CreateVirtual() and GetVirtual() methods return a reference to the VDir property which is a DirectoryEntry object to allow you full access to the various features exposed.

In creation of virtuals this class sets the properties based on the values of its member fields.

MemberDescription
AnonymousUserName Retrieved when calling GetDir();
AuthAnonymous Allow Anonymous access
AuthBasic Use basic Authentication
AuthNTLM Use Windows File Authentication.
DefaultDocuments The default documents that are searched for when no document is specified.
DomainName Used for GetWebSites to retrieve sites for a given domain or IP
ErrorMessage Contains error message on a failure result.
VDir Contains Virtual directory entry (as a DirectoryEntry object) after
the virtual was created.
CreateVirtual Creates a Virtual Directory on the Web Server and sets a few
common properties based on teh property settings of this object.

public Boolean CreateVirtual()
GetVirtual Loads the virtual into the VDir property

public Boolean GetVirtual(String Virtual)

public Boolean GetVirtual()

GetWebSites Returns a list of Web Sites on the local machine

public WebSiteEntry[] GetWebSites()
SaveVirtualDirectory This is an internal method that is used to write out the settings of the class against the currently active VDir property. It reads the field values, stuffs it into the Vdir's Property collection and then saves the changes to IIS.
public Boolean SaveVirtualDirectory()
FriendlyName
IISPath This is the IIS parentpath on which to read or create the virtual.
this path should not include a backslash at the end
Path The physical operating system path for the Virtual Directory
ServerType
Virtual The name of the Virtual directory. This is the Web name, not the physical Path.

Assembly: webconfiguration.exe
Namespace: Westwind.Tools.Web.Configuration

Inherits from:
System.Object
  Westwind.Tools.Web.Configuration.VirtualDirectory


Last Updated: 10/31/2004