473,503 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2056
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
2935
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
528
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
3697
by: seash | last post by:
class xyz{ public void somefunction{ if(this.folderBrowserDialog1.ShowDialog() == DialogResult.OK) { m_varFolderPath = this.folderBrowserDialog1.SelectedPath; m_varFolderPath += ...
0
1435
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
2146
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
277
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
1281
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
5126
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
2183
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
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7074
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...
0
7273
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6982
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7451
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5572
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4667
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3150
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1501
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.