473,386 Members | 1,908 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

in C# is there a managed code example to set ACLs on a folder

in C# is there a managed code example to set ACLs on a folder. We're
currently using the win32api and would like to migrate this functionality to
managed code in C#
Jul 21 '05 #1
5 2053
Hi Daniel!

"Daniel Cayouette" schrieb
in C# is there a managed code example to set ACLs on a folder. We're
currently using the win32api and would like to migrate this functionality
to
managed code in C#


"Managed"-code is not available at the moment. .NET 2.0/2005 will offer this
functionality.
There is a collection of .NET classes written in Managed C++ that faciliate
the manipulation of NT security rights which you can use in C#:
http://www.codeproject.com/dotnet/NTSecurityNET.asp

Cheers

Arne Janning

Jul 21 '05 #2
Hi Daniel!

"Daniel Cayouette" schrieb
in C# is there a managed code example to set ACLs on a folder. We're
currently using the win32api and would like to migrate this functionality
to
managed code in C#


"Managed"-code is not available at the moment. .NET 2.0/2005 will offer this
functionality.
There is a collection of .NET classes written in Managed C++ that faciliate
the manipulation of NT security rights which you can use in C#:
http://www.codeproject.com/dotnet/NTSecurityNET.asp

Cheers

Arne Janning
Jul 21 '05 #3
> "Managed"-code is not available at the moment. .NET 2.0/2005 will offer
this
functionality.
There is a collection of .NET classes written in Managed C++ that faciliate the manipulation of NT security rights which you can use in C#:
http://www.codeproject.com/dotnet/NTSecurityNET.asp

This is nice, but can someone show me how to use these classes to determine
if a destination directory has enough access to create subdirectories and
files for the current user?
I probably have to test on this ACL thing and file/directory attributes in
order to figure out if I will be able to write a file in that destination
folder without actually need in trying the write in compination with a
delete.

The classes are powerful, but I miss sample code to understand how to use
it.

Thanks.
Jul 21 '05 #4
Hi Olaf!

"Olaf Baeyens" schrieb
http://www.codeproject.com/dotnet/NTSecurityNET.asp

This is nice, but can someone show me how to use these classes to
determine
if a destination directory has enough access to create subdirectories and
files for the current user?


Have a look at the System.Security.Permissions.FileIOPermission-Class.

Cheers

Arne Janning
Jul 21 '05 #5
Hi Olaf!

"Olaf Baeyens" schrieb
http://www.codeproject.com/dotnet/NTSecurityNET.asp

This is nice, but can someone show me how to use these classes to
determine
if a destination directory has enough access to create subdirectories and
files for the current user?


Have a look at the System.Security.Permissions.FileIOPermission-Class.

Cheers

Arne Janning


Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mehrdad | last post by:
Hello, I have a set of C# classes and I am trying to instanciate and call them in a managed C++ project. I have been searching a lot but so far could not find any example or document on how to...
22
by: Alper AKCAYOZ | last post by:
Hello Esteemed Developers and Experts, I have been using Microsoft Visual C++ .NET for 1 year. During this time, I have searhed some topics over internets. Most of the topics about .NET is...
1
by: seash | last post by:
class xyz{ public void somefunction{ if(this.folderBrowserDialog1.ShowDialog() == DialogResult.OK) { m_varFolderPath = this.folderBrowserDialog1.SelectedPath; m_varFolderPath += ...
0
by: | last post by:
Something to get your teeth in. :-) I have a VC ++ managed .NET AAA.DLL that contains unmanaged code and MFC 7.0. If I provide AAA.DLL with te msvcp70.dll, msvcr70.dll and mfc70.dll in the same...
4
by: | last post by:
I am stuck in a situation and I do believe that this should work, but it doesn't. I have a unmanaged dll, that uses MFC. This works great. Now I recompile the unmanaged dll so it contains...
5
by: Daniel Cayouette | last post by:
in C# is there a managed code example to set ACLs on a folder. We're currently using the win32api and would like to migrate this functionality to managed code in C#
3
by: cisco | last post by:
Let's say i have something, that will eat up a lot of cpu cycles, that i want to run for the whole webpage( asp.net application and all subfolders underneath). What's the best way to accomplish...
7
by: Don | last post by:
Getting errors after following the MSDN article on using VB.NET (and VS2005) for "Implementing a Managed OnSave Event Sink" for Exchange Server 2007. Not sure, but part of the problem may be that...
1
by: =?Utf-8?B?Q2hyaXN0aWFuIGZyb20gRnJhbmNl?= | last post by:
I want to do the folllowing in C# : I have a DirectoryEntry : DirectoryEntry usr = new DirectoryEntry("LDAP://cn=Mike,ou=Users,dc=MyDc"); With "AD Users & Computers" Security tab an...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.