Active Directory - help!
Hello all,
I have a basic problem with accessing Active Directory. I think I am missing something very basic.
I have copied the following code into a project:
************************************************** **
Function VirDirExists(ByVal IISPath As String) As Boolean
Try
Dim oDE As System.DirectoryServices.DirectoryEntry
oDE = New System.DirectoryServices.DirectoryEntry
Return oDE.Exists(IISPath)
Catch
Label1.Text = Label1.Text & "VirDirExists Failure: " & Err.Description
End Try
End Function
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim sIISPath As String
sIISPath = "IIS:\\localhost\W3SVC\1\Root"
VirDirExists(sIISPath)
End Sub
*****************************************
The message shows "access denied". I don't understand what permissions the system is using. I have played with many settings but I don't know technically what's goin on.
Cheers!
|