Click here to Skip to main content
15,868,016 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: How to find group of single user from active directory.?? Pin
Christian Graus24-Nov-08 20:33
protectorChristian Graus24-Nov-08 20:33 
GeneralRe: How to find group of single user from active directory.?? Pin
Piyush Vardhan Singh24-Nov-08 21:19
Piyush Vardhan Singh24-Nov-08 21:19 
QuestionShow checkbox inside a dropdownlist Pin
SreejithAchutan24-Nov-08 19:30
SreejithAchutan24-Nov-08 19:30 
AnswerRe: Show checkbox inside a dropdownlist Pin
Christian Graus24-Nov-08 19:34
protectorChristian Graus24-Nov-08 19:34 
AnswerRe: Show checkbox inside a dropdownlist Pin
Abhijit Jana24-Nov-08 19:34
professionalAbhijit Jana24-Nov-08 19:34 
QuestionShow data in gridview vertically and update vertically also? Pin
pundir abhishek24-Nov-08 19:20
pundir abhishek24-Nov-08 19:20 
AnswerRe: Show data in gridview vertically and update vertically also? Pin
Christian Graus24-Nov-08 19:26
protectorChristian Graus24-Nov-08 19:26 
QuestionFetch all the permissions of a folder/file of IUser [modified] Pin
Pankaj Saha24-Nov-08 19:19
Pankaj Saha24-Nov-08 19:19 
I have a asp.net web application. I need to fetch all the permissions of a file/folder.

I have used the following code to access the rights of a folder

static void Main(string[] args)
{

// Get the object and its SecDescp

DirectoryInfo dir = new DirectoryInfo("C:\\Documents and Settings\\pankaj\\Desktop\\ASPDev");
DirectorySecurity sec = dir.GetAccessControl(AccessControlSections.All);

// Create an empty Security Descp...
DirectorySecurity secNew = new DirectorySecurity();

// Get the explicit perms on the object.
AuthorizationRuleCollection col = sec.GetAccessRules(true, false, typeof(SecurityIdentifier));

// List all the explicitly set permissions on the object...
foreach (FileSystemAccessRule rule in col)
{

// Add the explicit permission to the new Security Descp.
//secNew.AddAccessRule(rule);
Console.WriteLine("{0}", rule.FileSystemRights.ToString());
//Console.WriteLine("{0}", rule.AccessControlType.ToString() + " | " + rule.IdentityReference.Value + " | " + rule.InheritanceFlags.ToString() + " | " + rule.IsInherited.ToString() + " | " + rule.PropagationFlags.ToString() + " | " + rule.FileSystemRights.ToString() + "\r\n");

}

// Create a child folder with the explicit permissions only...
//DirectoryInfo info2 = new DirectoryInfo("e:\\kgk\\Test\\Child");
//info2.Create(secNew);

Console.ReadLine();
}


However I need to fetch the IUser permissions.

Would you please let me know how can I do this.

Pankaj

modified on Tuesday, November 25, 2008 1:36 AM

AnswerRe: Fetch all the permissions of a folder/file of IUser Pin
Christian Graus24-Nov-08 19:25
protectorChristian Graus24-Nov-08 19:25 
Questionhow to read the data of a comp port through asp.net page Pin
souravghosh1824-Nov-08 19:00
souravghosh1824-Nov-08 19:00 
AnswerRe: how to read the data of a comp port through asp.net page Pin
Christian Graus24-Nov-08 19:06
protectorChristian Graus24-Nov-08 19:06 
GeneralRe: how to read the data of a comp port through asp.net page Pin
souravghosh1824-Nov-08 19:25
souravghosh1824-Nov-08 19:25 
GeneralRe: how to read the data of a comp port through asp.net page Pin
Abhijit Jana24-Nov-08 19:29
professionalAbhijit Jana24-Nov-08 19:29 
GeneralRe: how to read the data of a comp port through asp.net page Pin
Christian Graus24-Nov-08 19:33
protectorChristian Graus24-Nov-08 19:33 
QuestionSecurity Trimming Enabled Pin
kenexcelon24-Nov-08 10:56
kenexcelon24-Nov-08 10:56 
GeneralRe: Security Trimming Enabled Pin
Guffa24-Nov-08 13:57
Guffa24-Nov-08 13:57 
GeneralRe: Security Trimming Enabled Pin
kenexcelon24-Nov-08 14:19
kenexcelon24-Nov-08 14:19 
QuestionDynamically adding controls to a page Pin
gantww24-Nov-08 10:39
gantww24-Nov-08 10:39 
AnswerRe: Dynamically adding controls to a page Pin
Christian Graus24-Nov-08 10:52
protectorChristian Graus24-Nov-08 10:52 
GeneralRe: Dynamically adding controls to a page Pin
Mike Holpuch18-Dec-08 9:03
Mike Holpuch18-Dec-08 9:03 
QuestionHow to set password to my database.mdf in App_Data folder? Pin
god4k24-Nov-08 6:42
god4k24-Nov-08 6:42 
AnswerRe: How to set password to my database.mdf in App_Data folder? Pin
Christian Graus24-Nov-08 8:56
protectorChristian Graus24-Nov-08 8:56 
GeneralRe: How to set password to my database.mdf in App_Data folder? Pin
god4k24-Nov-08 16:01
god4k24-Nov-08 16:01 
GeneralRe: How to set password to my database.mdf in App_Data folder? Pin
Christian Graus24-Nov-08 16:45
protectorChristian Graus24-Nov-08 16:45 
QuestionDisable a page similiar to the ModalPopupExtender (non javascript) Pin
playout24-Nov-08 6:10
playout24-Nov-08 6:10 

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.