Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 26th, 2006, 08:06 PM
Registered User
Join Date: Mar 2006
Location: Sydney, NSW, Australia.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default why File System GetAuditRules() returns null

Hi Folks,

I am trying to get information about File Auditing using ASP.NET.

I am trying to get that information on website but it doesn't work and return null

collection of FileSystemAuditRule. But when I try to use GetFileAccessRules() method. It

works fine and return valid collection. This is sure file has an audit active. and it should

return one record at least.

Why GetFileAccessRules() works and GetFileAuditRules() doesn't work. Is there any difference

between them while using?

If I am using wrong way to get file audit information then please let me know what is the

best way to check file auditing?

Please help me because due to this I am stuck. I would really appreciate your assistance.

I am using the following code to get file audit information.

string FileName = Server.MapPath("test.txt");

FileSecurity fSecurity = File.GetAccessControl(FileName);

foreach (FileSystemAuditRule ace in fSecurity.GetAuditRules(true, true, typeof(NTAccount)))


Console.WriteLine("\tIdentityReference.Value: " + ace.IdentityReference.Value);

Console.WriteLine("\tAuditFlags: " + ace.AuditFlags);

Console.WriteLine("\tRegistryRights: " + ace.RegistryRights.ToString());

Console.WriteLine("\tInheritanceFlags: " + ace.InheritanceFlags);

Console.WriteLine("\tIsInherited: " + ace.IsInherited);

Console.WriteLine("\tPropagationFlags: " + ace.PropagationFlags);



Waiting for your prompt and helpful reply with thanks in anticipation

G. Mustafa

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript getElementById returns null VictorVictor ASP.NET 2.0 Professional 15 January 15th, 2010 06:53 PM
writing into a file in linux file system anboss XSLT 6 June 19th, 2008 01:56 PM
getRealPath returns null in Fedora bbhutta Servlets 0 October 21st, 2005 07:20 AM
Access from a Dbase drop down returns NULL topshed Access 0 December 2nd, 2004 10:48 PM
Reading Files In - end of file and placing null djwicks C# 0 May 15th, 2004 11:23 PM

All times are GMT -4. The time now is 05:55 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.