473,729 Members | 2,149 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Add/Remove permissions to folders programmaticall y

Hello folks

Is it possible to add/remove Read Permissions (and any other NTFS
permissions) to a folder programmaticall y via an ASP.NET page?

Thanks.
Nov 19 '05 #1
1 1461
Try:

System.IO.File. SetAttributes(. ..);

HTH,
Axel Dahmen

--
www.sportbootcharter.com

-------------
"Codex Twin" <co***@more.com > schrieb im Newsbeitrag
news:u8******** ******@TK2MSFTN GP14.phx.gbl...
Hello folks

Is it possible to add/remove Read Permissions (and any other NTFS
permissions) to a folder programmaticall y via an ASP.NET page?

Thanks.

Nov 19 '05 #2

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

Similar topics

0
4660
by: HitSkiper | last post by:
I am getting the error "The security ID structure is invalid." When running this code. Sub SetPermissions(ByRef vPath As String, ByVal UserName As String) Dim objADsSec As ADsSecurity Dim objSecDes As SecurityDescriptor Dim objDAcl As AccessControlList Dim objAce As Object Dim objAce1 As AccessControlEntry Dim objAce2 As AccessControlEntry
13
12719
by: Dennis C. Drumm | last post by:
I use the Documents and Settings\All Users\Application Data\AppName folder to store xml settings that are applicable to all user who log onto a machine. (The uers personal settings associated with my application are stored in the system registry's HKEY_CURRENT_USER section) When the xml file and news folder are created by my application running under Windows XP, the new folder and the xml file have permissions set for Everyone to read...
2
2166
by: ralderton | last post by:
How can you set folder permissions from an asp.net (vb.net) Web app I want to dynamically create folder and assign full permissions to only system and a specific user account Thanks
0
937
by: eNathan | last post by:
We have a repository of reports(Crystal). It is many folders and subfolders. We have set permissions to these folders based on who needs access to them; we have implemented groups in Active Directory. Problem: I want to populate a tree view with only the folders the user has permission to. I can get the groups the user is a member of. I can't determine which groups have permissions to which folders. Any suggestions would be welcomed.
2
313
by: Phil Hey | last post by:
I am trying to set permissions on a folder programmatically, and have success fully used the code below for knowledge base article 266461 : How To: Programmatically Set NTFS File System Folder Permissions Using Microsoft Visual Basic . NET However I need to set the permissions to Read Only rather than Full Control, can any one help me with this. Dim objADsSec As ADsSecurity
1
1462
by: Bill Nguyen | last post by:
I tried to rename a local folder (C:\Program Files\Microsoft Mappoint\Data) in my VB.NEt app but running into permission problem. I even granted full rights to ASPNET user to the folder in question but it's still not working. If I do it manually (my login has administrator rights to the local/client machine), I had no problem. Is there any way to assume the local admin role programmatically to do this? Thanks Bill
0
1350
by: Curt K | last post by:
We run some web services (IIS 5 and IIS 6) that communicate to a COM out of process server, which in turn communicates to another out of process COM server (long story). We have had lots of permissions issues getting the web service to communicate to the COM object to the point that we use the "administrator" account (yes, I know this is really bad). We need to tidy this for security purposes and to run under Vista and properly set up...
3
4863
by: Corey B | last post by:
I have a web server running IIS 6. The network security team here has completely locked down the server. They have installed an application called Cisco Security Agent (CSA). What CSA does is deny or allow access to certain files and folders. Currently they have it set up very restrictively so that it denies access to lots of files and folders. I find that when I go to run any type of ASP.NET application I receive error messages that...
4
4092
by: kanepart2 | last post by:
Hey , I need to make a function in C# that gets the permissions on a folder and its sub folders. I wanted to list the users and the permissions they have been granted on folders. I dont know if it is conviniently possible. I am guessing that I'd probably have to use directorysecurity. Some help would be appreciated.
0
8761
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
9426
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9280
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
9200
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
8144
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...
0
6016
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
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3238
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 we have to send another system
2
2677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.