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.
Westwind.WebMonitor.Components.VirtualDirectory
public class VirtualDirectory : object
Class Members
Member | Description | |
---|---|---|
Constructor |
||
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 | |
DotNetVersion |
||
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 bool CreateVirtual(); |
|
GetDotNetVersions |
Returns a list of installed .NET versions public String[] GetDotNetVersions(); |
|
GetVirtual |
Loads the virtual into the VDir property public bool GetVirtual( string Virtual ); public bool 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 bool SaveVirtualDirectory(); |
|
SetDotNetVersion |
public bool SetDotNetVersion(); |
|
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 <<%= TopicLink([Path],[_1D903S953]) %>>. |
Requirements
Namespace: Westwind.WebMonitor.ComponentsAssembly: webmonitorcomponents.dll
© West Wind Technologies, 2018 • Updated: 12/28/06
Comment or report problem with topic