Click here to Skip to main content
15,897,273 members
Home / Discussions / C#
   

C#

 
AnswerRe: Recommendation for FTP/SFTP/FTPS component in C#? Pin
Eddy Vluggen28-Sep-10 6:40
professionalEddy Vluggen28-Sep-10 6:40 
AnswerRe: Recommendation for FTP/SFTP/FTPS component in C#? Pin
jschell29-Sep-10 9:50
jschell29-Sep-10 9:50 
QuestionAsking Google for Pagerank Programatically Pin
jimbo809827-Sep-10 11:56
jimbo809827-Sep-10 11:56 
AnswerRe: Asking Google for Pagerank Programatically Pin
Luc Pattyn27-Sep-10 12:04
sitebuilderLuc Pattyn27-Sep-10 12:04 
GeneralRe: Asking Google for Pagerank Programatically Pin
jimbo809827-Sep-10 23:58
jimbo809827-Sep-10 23:58 
GeneralRe: Asking Google for Pagerank Programatically Pin
jimbo809830-Sep-10 3:19
jimbo809830-Sep-10 3:19 
GeneralRe: Asking Google for Pagerank Programatically Pin
Luc Pattyn30-Sep-10 3:31
sitebuilderLuc Pattyn30-Sep-10 3:31 
QuestionHow to set folder/file security permission? Pin
Chesnokov Yuriy27-Sep-10 8:44
professionalChesnokov Yuriy27-Sep-10 8:44 
The default way from documentation states:

static void SetFolderPermission(string folder, FileSystemRights fsRights, IdentityReference ir)
{
DirectoryInfo dInfo = new DirectoryInfo(folder);                
DirectorySecurity ds = dInfo.GetAccessControl();
FileSystemAccessRule fsRule = new FileSystemAccessRule(ir, fsRights, AccessControlType.Allow);                
ds.AddAccessRule(fsRule);
dInfo.SetAccessControl(ds);
}


However when you right click and choose security properties for a given folder there is a list of attributes check boxes:

Full
Modify
Read and Execute
Folder List
Read
Write
Special Permissions


The code from above adds to Special Permissions rules only. How to enable the rest of the items?

In web application I need to enable IIS_IUSRS write permission to some folder. If I run the code as above Special Permissions rule is created. However it does not work.
Only if manually checked Write box web application can create and access files in a given folder.
Чесноков

AnswerRe: How to set folder/file security permission? Pin
phil.o28-Sep-10 0:07
professionalphil.o28-Sep-10 0:07 
Questioncondition for x64 Pin
mersad0027-Sep-10 8:41
mersad0027-Sep-10 8:41 
GeneralRe: condition for x64 Pin
harold aptroot27-Sep-10 9:31
harold aptroot27-Sep-10 9:31 
GeneralRe: condition for x64 Pin
Luc Pattyn27-Sep-10 9:55
sitebuilderLuc Pattyn27-Sep-10 9:55 
QuestionRe: condition for x64 Pin
mersad0027-Sep-10 10:04
mersad0027-Sep-10 10:04 
AnswerRe: condition for x64 Pin
Dave Kreskowiak27-Sep-10 10:44
mveDave Kreskowiak27-Sep-10 10:44 
Questionre-using a dll. Pin
caradri27-Sep-10 4:47
caradri27-Sep-10 4:47 
AnswerRe: re-using a dll. Pin
Luc Pattyn27-Sep-10 5:04
sitebuilderLuc Pattyn27-Sep-10 5:04 
AnswerRe: re-using a dll. Pin
caradri27-Sep-10 6:26
caradri27-Sep-10 6:26 
AnswerRe: re-using a dll. Pin
Luc Pattyn27-Sep-10 6:31
sitebuilderLuc Pattyn27-Sep-10 6:31 
Questionc# Pin
Janded27-Sep-10 3:45
Janded27-Sep-10 3:45 
AnswerRe: c# Pin
Pete O'Hanlon27-Sep-10 4:01
mvePete O'Hanlon27-Sep-10 4:01 
AnswerRe: c# Pin
Dave Kreskowiak27-Sep-10 4:03
mveDave Kreskowiak27-Sep-10 4:03 
AnswerRe: c# Pin
Abhinav S27-Sep-10 4:21
Abhinav S27-Sep-10 4:21 
QuestionDataGridView Code example required Pin
MVenugopal27-Sep-10 0:59
MVenugopal27-Sep-10 0:59 
AnswerRe: DataGridView Code example required Pin
Richard MacCutchan27-Sep-10 1:16
mveRichard MacCutchan27-Sep-10 1:16 
AnswerRe: DataGridView Code example required Pin
Peace ON27-Sep-10 2:28
Peace ON27-Sep-10 2:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.