DirectoryEntry and fileshare problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tulgaa

    #1

    DirectoryEntry and fileshare problem

    i use following code:

    --------------------------------------
    private sub ShareFolder()
    Dim ct As New DirectoryEntry( "WinNT://" +
    SystemInformati on.ComputerName + "/LanmanServer")
    ct.Authenticati onType = AuthenticationT ypes.Signing Or _
    AuthenticationT ypes.Sealing Or _
    AuthenticationT ypes.Secure
    ct.Username = Nothing
    ct.Password = Nothing
    Dim shares As DirectoryEntrie s = ct.Children
    Dim share As DirectoryEntry =
    ct.Children.Add ("foldersharena me", "fileshare" )
    share.Propertie s("path").Add(" c:\new folder")
    share.CommitCha nges()

    end sub
    -------------------------------------

    After calling ShareFolder function,"c:\ne w folder" folder was shared.
    But when opening the folder from any other computer than mine through
    LAN (Local Area Network), "\\Tulgaa\N ew Folder is not accessible. You
    might not have permission to user this network resource. Contact the
    administrator of this server ot find out if you have access
    permissions" msg is thrown. When I share a folder manually from
    Explorer, all is fine.

    How to solve this problem, tell me please !!!

    Tulgaa

Working...