How to let a user account have write privilege of a folder

A

ad

I want to let a user account like John have the wirte privilege of a
specifed folder.
How can I do that by C#?
 
N

Nicholas Paldino [.NET/C# MVP]

In .NET 2.0, you will have to call the GetAccessControl method on the
Directory class or the DirectoryInfo class. This will return a
DirectorySecurity instance which you can use to modify the rights to the
directory for.

If you are using .NET 1.1 or before, then you will have to make the
calls to the appropriate APIs in the platform in order to do this.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top