skip to main | skip to sidebar

ASP.NET / SQLSERVER

All I have learned.

Friday, November 30, 2007

User friendly name of the owner of the file.

using System.IO;
using System.Security.Principal;
using System.Security.AccessControl;

FileSecurity fs = File.GetAccessControl(@"C:\CERT\Thinking_in_C_\Thinking in C#.pdf");
NTAccount ntac = fs.GetOwner(typeof(NTAccount)) as NTAccount;
Console.WriteLine(ntac.Value);
Posted by Madhusudan Gohil at 8:10 AM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2014 (1)
    • ►  March (1)
  • ►  2009 (5)
    • ►  September (2)
    • ►  March (2)
    • ►  January (1)
  • ►  2008 (12)
    • ►  November (1)
    • ►  August (6)
    • ►  July (1)
    • ►  June (4)
  • ▼  2007 (45)
    • ►  December (5)
    • ▼  November (11)
      • SECUTIL to retrieve public key from assembly.
      • User friendly name of the owner of the file.
      • Tools for Interoperability between the.NET Framewo...
      • Windows Forms ActiveX Control Importer (Aximp.exe)
      • Assembly Registration Tool (Regasm.exe)
      • Attachement as a Linked Resource
      • CultureInfo & RegionInfo
      • Send mail using dot net
      • Security Tip
      • ManagementObjectSearcher
      • Dot Net Questions
    • ►  October (12)
    • ►  May (1)
    • ►  April (7)
    • ►  March (9)

About Me

Madhusudan Gohil
Systems Analyst
View my complete profile