RE: Network Path not found

From: Gary (gary@online.microsoft.com)
Date: 09/10/02


From: gary@online.microsoft.com (Gary)
Date: Tue, 10 Sep 2002 06:45:53 GMT


I have tested against the code below and it worked fine:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here
        Dim sUsername As String = "***"
        Dim sPassword As String = "***"
        Dim oDirNTRoot As DirectoryEntry = New
DirectoryEntry("WinNT://sha-garygu-01", sUsername, sPassword)

        'Dim oUserDir As DirectoryEntry =
oDirNTRoot.Children.Find(sUsername, "user")
        Dim oGroupDir As DirectoryEntry =
oDirNTRoot.Children.Find("Administrators", "group")
        Dim oUserDir As DirectoryEntry = oDirNTRoot.Children.Find(sUsername
, "user")

        Dim bIsGroupMember As Boolean = False
        If oGroupDir.Name <> "" Then
            bIsGroupMember = oGroupDir.Invoke("IsMember", New Object()
{oUserDir.Path.ToString()})
        End If

    End Sub

Please tell me which code line causes the error? In addtioon, please post
here the contents of the web.config file.

Gary

This posting is provided "AS IS", with no warranties, and confers no
rights. Enjoyed ASP.NET? http://www.asp.net



Relevant Pages

  • Re: OWA - Sent Items
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... > By Sender. ...
    (microsoft.public.exchange.admin)
  • Re: selecting radio button in datalist
    ... protected void DataList1_ItemDataBound(object sender, ... rights. ... (This posting is provided "AS IS", with no warranties, and confers no ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Calendar Control Question
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... Private Sub Calendar1_DayRender(ByVal sender As Object, ...
    (microsoft.public.dotnet.general)
  • Re: Bandwidth limits
    ... This is how sender knows the speed of the network... ... the destination site,, and finds out the time ... This posting is provided "AS IS" with no warranties, and confers no rights. ...
    (microsoft.public.sms.setup)
  • Re: Atlas error...
    ... protected void Submit1_ServerClick(object sender, EventArgs e) ... rights. ... (This posting is provided "AS IS", with no warranties, and confers no ...
    (microsoft.public.dotnet.framework.aspnet)