Advertisement

05.22.2008 at 01:57PM PDT, ID: 23425891
[x]
Attachment Details

Need help on shared folder

Asked by newmancroos_s in Microsoft Visual Basic.Net, C# Programming Language

Tags: vb.net or any .net language

hello Friends,

I need to remove all folder sharing permission for all users (not for groups) to a remote folder.
My existing code look like this...

 oSecurity = File.GetAccessControl(TopLevelDirectoryName)
            Dim DirSecRules As AuthorizationRuleCollection = oSecurity.GetAccessRules(True, True, GetType(System.Security.Principal.SecurityIdentifier))
            For Each DirSecRule As FileSystemAccessRule In DirSecRules

                oSecurity.RemoveAccessRuleAll(DirSecRule)
            Next
            File.SetAccessControl(TopLevelDirectoryName, oSecurity)


problem is, it is remove all the users/Group permission but i want to remove only user permission.


I'm expecting your reply ASAP

Advance thanks for you help...


NewmancroosStart Free Trial
[+][-]05.23.2008 at 05:18AM PDT, ID: 21631320

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.23.2008 at 07:57AM PDT, ID: 21632699

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 04:06PM PDT, ID: 21724804

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Visual Basic.Net, C# Programming Language
Tags: vb.net or any .net language
Sign Up Now!
Solution Provided By: newmancroos_s
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628