473,756 Members | 4,165 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Folder Permissions

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
Nov 18 '05 #1
2 2167
You can create folders programmaticall y using functions from the system.io
namespace, and you can assign permissiins with the system.director yservices
namespace.

The later is a little tricky as it is a wrapper to Win32 APIs. Be sure to
use the WinNT provider. It also involves knowing some commands which you will
not see with Intellisense. I strongly recommend you download ADSI 2.5 and
read the documentation and samples that come with it. Here is the link

http://www.microsoft.com/NTWorkstati...her/ADSI25.asp

hope this helps,
John

"ralderton" wrote:
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

Nov 18 '05 #2
Hi ralderton,

Just as John suggested, you may the classes System.IO namespace to create a
folder. Then to control the folder's permission through ADSI, in .Net
Framework, we can use System.Director yServices namespace to invoke the
ADSI.

ADsSecurity.DLL is the ADSI resource kit utility, it can help you to
control folder permission, for more information, please follow this KB:
"HOWTO: Use ADsSecurity.dll to Add an Access Control Entry to an NTFS
Folder"
http://support.microsoft.com/default.aspx?id=279682

You may also get much useful information about ADSI control NTFS permission
through:
http://www.serverwatch.com/tutorials...le.php/1476721
http://www.serverwatch.com/tutorials...le.php/1476741
http://www.serverwatch.com/tutorials...le.php/1476751

=============== =============== =============== =
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 18 '05 #3

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

Similar topics

0
3516
by: Andrew Crowe | last post by:
Hi guys, We're using the ISAPI version of PHP with IIS5.0 On some websites for some reason any php file in the websites root is given the path winnt/system32 (getcwd() returns "C:\WINNT\system32"), while files in a folder are given the correct dir. To fix this I created a file that's included to all the files from php.ini
7
2553
by: Kim Lots | last post by:
Hi Sorry to disturb you again but i really like to know what's the NTFS folder permissions on a "virtual directory" folder for a public webserver iis 5.x running ASP 3.0 with an Access DB on a w2k pro machine with anonymous access. Fyg this is non commercial website for neighbour members in a carpool with booking possibility. No file upload is allowed/possible/needed. Login is manged by the ASP script
3
3659
by: roger | last post by:
I've created a web setup project for my aspnet app, and added a web folder item "tmp" to the File System editor under the web application folder. (My app uses this folder for generating image files and such) Problem is, I can't figure out how to make this folder writable by the ASPNET user during installation.I've set the writable property for the new folder object, but it doesn't give the permission to the ASPNET user.
0
2339
by: Praveen | last post by:
Hello. I am writing some code that accepts a DFS Link and Username and grants that User permissions to the physical directory that the DFS Link corresponds to. I am using the System.Management namespace and WMI queries. When I run the code below and check the Security tab of the folder , I find that all entries have been cleared – which is ok and this is expected, main problem is that the User that I have set up the Trustee and ACE...
7
2214
by: Tom | last post by:
Can anyone give me any advice on how to secure a folder on a network server so that documents in the folder can only be opened through an Access database or by the database admin. I need to store MS Word docs in a folder on a network server. The database admin will save the docs to the folder. The docs must be available to Word automation out of a specific Access database and available to the database admin out of MS Word. Only users of...
2
2334
by: Ram | last post by:
Hey, I'v managed to find a way of adding NTFS permissions to a certain folder, But the problem is, the folder has a couple of inherited permissions which I want to delete. How can I remove the folder's NTFS permissions WITHOUT using WMI or special XP features? Thanks ahead! --Ram
6
14855
by: Jeff | last post by:
Hi - I understand how to create a directory folder, but how can I programatically create a _shared_ directory folder and set its permissions?? (I'm using VB.NET.) Thanks for your help. - Jeff
5
13303
by: Mitchell S. Honnert | last post by:
Is there a way, given the full path of a folder on a network, that one can programatically tell if you have Read access to that folder? I have an application where the user is able to select a number of search folders using the standard dialog control. There shouldn't be an issue with the search folder being on a local drive or a network drive. But if you don't have Read access to the folder, there's trouble. The user can see the...
2
4117
by: skinnybloke | last post by:
Hi - I have a file permissions problem with PHP. I am using a product called Actinic to develop a shopping cart. This creates a subfolder named ACATALOG into which it loads all of its files. The permissions for this folder is set to 777. I have set up a page in the package to call a .PHP page. When I try to run the PHP page I get the error message: "A file permissions error has occurred running this script.
6
29497
by: Andy Fish | last post by:
Hi, From what I can gather, under Asp.Net 2.0, it is safe to put data and config files underneath the app_data in the web root and they will not be served directly to the browser from a URL. Can anyone explain just how this feature works. is app_data a reserved name for IIS and ASP.Net, or is there some jiggery pokery going on behind the scenes with file permissions or virtual roots?
0
9487
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
9297
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
9904
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...
0
9735
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6556
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
5168
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...
0
5324
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3828
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
3
2697
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.