|
-
Dec 13th, 2005, 05:40 PM
#11
New Member
Re: Create Virtual Directory in IIS using VB.NET
I used this to find the correct site id:
---------------------------------------
Dim SiteID As Integer
Dim root As New System.DirectoryServices.DirectoryEntry("IIS://" & ServerName & "/W3SVC")
For Each e As System.DirectoryServices.DirectoryEntry In root.Children
If e.SchemaClassName.ToUpper = "IISWEBSERVER" AndAlso CStr(e.Invoke("Get", "ServerComment")).ToUpper = SiteName.ToUpper Then
SiteID = Convert.ToInt32(e.Name)
Exit For
End If
Next
Dim IISAdmin As New System.DirectoryServices.DirectoryEntry("IIS://" & ServerName & "/W3SVC/" & SiteID & "/Root")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|