473,657 Members | 2,612 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 2067
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.Fi leIOPermission-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.Fi leIOPermission-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
2945
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 this. I have heard people say it is even possible to wirte a class in C# and subclass it in C++. Can anybody give me a hint or some link to related usefull documents. thanks.
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 related to C# and Visual Basic .NET. There are less documents about Visual C++ .NET or Managed C++. I wonder the reasons of below questions: 1) Is C# more powerful than Managed C++ and Visual C++ .NET? 2) Is Microsoft intending to support C# and...
1
3711
by: seash | last post by:
class xyz{ public void somefunction{ if(this.folderBrowserDialog1.ShowDialog() == DialogResult.OK) { m_varFolderPath = this.folderBrowserDialog1.SelectedPath; m_varFolderPath += "\\Iamlucky.txt";
0
1441
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 folder, then this can be used in other .NET code for example C#. Now I have a pure c# generated .NET BBB.DLL that uses AAA.DLL. This code works great used in C# projects and I have the AAA and BBB functionality.
4
2164
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 mixed mode managed/unmanaged code, but only use unmanaged code, but this gives a error the moment I want to display a MFC dialog box: Something like unreferenced object,... during runtime.
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
1291
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 this? I can't have anyone 'turn off' this feature or atleast not anyone who is not an administrator on the box(win 2k3). If the check fails i want any asp.net request to not return the page they requested but an error message. I implemented it...
7
5131
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 it's the 64-bit version of Exchange 2007 installed on Windows Server 2003 Enterprise x64, while the Exchange 2007 SDK samples seem mostly geared toward 32-bit. Even at that, I was able to build the TLB and install it into COM+ Component Services,...
1
2187
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 administrator had give to some users the right to write the accountExpires property of this Account. I want to read the ACLs on this object and obtain the list on the users who have this right. How can i do ?
0
8392
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8730
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7321
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1607
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.