473,382 Members | 1,442 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,382 software developers and data experts.

How to assign permissions on file?

There are 2 Users on PC - User1 & User2. It is necessary to assign for User1 "Full control" on file c:\test.txt & to assign for User2 "Read only" on fhat file. How can I do it using .NET framework classes & C#?
Jul 21 '05 #1
2 1348
Take a look at FileIOPermission class and available methods. And samples of
course.

HTH
Alex

"CsharpStudent" <an*******@discussions.microsoft.com> wrote in message
news:BD**********************************@microsof t.com...
There are 2 Users on PC - User1 & User2. It is necessary to assign for

User1 "Full control" on file c:\test.txt & to assign for User2 "Read only"
on fhat file. How can I do it using .NET framework classes & C#?
Jul 21 '05 #2
Take a look at FileIOPermission class and available methods. And samples of
course.

HTH
Alex

"CsharpStudent" <an*******@discussions.microsoft.com> wrote in message
news:BD**********************************@microsof t.com...
There are 2 Users on PC - User1 & User2. It is necessary to assign for

User1 "Full control" on file c:\test.txt & to assign for User2 "Read only"
on fhat file. How can I do it using .NET framework classes & C#?
Jul 21 '05 #3

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

Similar topics

15
by: lkrubner | last post by:
I want to give users the power to edit files from an easy interface, so I create a form and a PHP script called "fileUpdate". It does a reasonable about of error checking and prints out some...
0
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting FrontPage extensions 2002 hosted by the company...
2
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting FrontPage extensions 2002 hosted by the company...
6
by: !!! Klutzo !!! | last post by:
I give permissions for ASPNET on a top level subdirectory. A windows program copies a file into the subdirectory, however, my web service cannot access the file because it does not have...
1
by: CsharpStudent | last post by:
There are 2 Users on PC - User1 & User2. It is necessary to assign for User1 "Full control" on file c:\test.txt & to assign for User2 "Read only" on fhat file. How can I do it using .NET...
1
by: beary | last post by:
Hello everyone, I'm not sure if this is the correct forum for this, and apologies for the length of this question, but I'm desperate for some good advice... I'm in way over my head with file...
2
by: beary | last post by:
Hello everyone, I posted this in unix/linux but it received no replies, so I assume it was the wrong forum. I'm trying here. I'm in way over my head with file permissions. The directory and...
0
by: owuraku | last post by:
I appreciate the help you guys (especially Adezii) have given me thus far. I have one more question to help me complete my database. I am trying to use DAO to programmatically assign permissions to...
5
by: ashok90 | last post by:
hi Experts, I want to use Active Directory with C# .Net. My Problem is that i want to restrict some users on my system(which is not on any network) from accessing some applications like oracle,...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.