I am using .NET 3.5 and accessing a local share
DirectorySecurity ds = Directory.GetAccessControl("\\\\127.0.0.1\\c$\\test");
But this gives an exception error of 1265
at
System.Security.AccessControl.NativeObjectSecurity.CreateInternal(ResourceType
resourceType, Boolean isContainer, String name, SafeHandle handle,
AccessControlSections includeSections, Boolean createByName,
ExceptionFromErrorCode exceptionFromErrorCode, Object exceptionContext)\r\n
at System.Security.AccessControl.FileSystemSecurity..ctor(Boolean
isContainer, String name, AccessControlSections includeSections, Boolean
isDirectory)\r\n at
System.Security.AccessControl.DirectorySecurity..ctor(String name,
AccessControlSections includeSections)\r\n at
System.IO.Directory.GetAccessControl(String path)\r\n
Any Ideas on how to overcome this?
Dominick Baier - 26 Nov 2007 10:08 GMT
You cannot set/retrieve ACLs for shares - only physical directories
-----
Dominick Baier (http://www.leastprivilege.com)
Developing More Secure Microsoft ASP.NET 2.0 Applications (http://www.microsoft.com/mspress/books/9989.asp)
> I am using .NET 3.5 and accessing a local share
>
[quoted text clipped - 17 lines]
>
> Any Ideas on how to overcome this?