Access problems trying to access my log files

From: tshad (tscheiderich_at_ftsolutions.com)
Date: 12/08/04


Date: Tue, 7 Dec 2004 16:19:06 -0800

I am trying to access my log files and am running into a permissions
problem.

I am doing the following:

******************************************************************
private void PopulateSiteBox()
{
 drpSiteBox.Items.Clear();
 string FILE_PATH = @"\\" +txtMachine.Text +
@"\C$\windows\System32\LogFiles\";

 Trace.Warn("FILE_PATH = " + FILE_PATH);

 DirectoryInfo di = new DirectoryInfo(FILE_PATH);
 foreach(FileSystemInfo fsi in di.GetFileSystemInfos())
 {
  if(fsi.Name.StartsWith("W3"))
  drpSiteBox.Items.Add(fsi.Name);
 }
}
*********************************************************************

The error I am getting is on the GetFileSystemInfos() call. This is trying
to access:

 FILE_PATH = \\sam\C$\windows\System32\LogFiles\

To get the W3... folder to get the name of the folder the ex040920.log is
in.

I tried to audit the folder LogFiles setting the success and failure to all
and to everyone. I wanted to find out what user is trying to access the
folder. I am not sure what user the asp.net is using.

The error I get is:

*****************************************************************************
 Access to the path "\\tfs\C$\windows\System32\LogFiles\" is denied.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Access to the path
"\\tfs\C$\windows\System32\LogFiles\" is denied.

ASP.NET is not authorized to access the requested resource. Consider
granting access rights to the resource to the ASP.NET request identity.
ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or
Network Service on IIS 6) that is used if the application is not
impersonating. If the application is impersonating via <identity
impersonate="true"/>, the identity will be the anonymous user (typically
IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in Explorer,
choose "Properties" and select the Security tab. Click "Add" to add the
appropriate user or group. Highlight the ASP.NET account, and check the
boxes for the desired access.

******************************************************************************

As I said I did try to set the permissions to everyone to solve the problem
(temporarily). This is only on my WXP Pro machine so I am not concerned
with anyone getting access to my machine.

What do I need to set to make this work?

Thanks,

Tom.



Relevant Pages

  • Re: Access problems trying to access my log files
    ... you cannot use a unc path, unless you give the asp.net account network ... | I am trying to access my log files and am running into a permissions ... folder to get the name of the folder the ex040920.log is ... | granting access rights to the resource to the ASP.NET request identity. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Allowing user access to one single file in a folder.
    ... Access to the folder is controled by groups ... > and users are given full control of the files at the folder level. ... > the first request to allow someone only access to a single file. ... permissions from the parent to propogte this object..." ...
    (microsoft.public.win2000.security)
  • Re: Folder Redirection error
    ... This is not a permissions issue, ... > the Folder redirection. ... > Posted using the http://www.windowsforumz.com interface, at author's request ...
    (microsoft.public.win2000.group_policy)
  • Re: Minimum NTFS Permissions - Theres such a thing???
    ... ?2001 Microsoft Corporation. ... HOW TO: Set Minimum NTFS Permissions Required for IIS 5.0 to Work WGID:198 ... " List Folder Contents" ...
    (microsoft.public.inetserver.iis.security)
  • Re: Unable to delete orphaned 1.5 GB System Restore folder
    ... The fact that the tech support is based in India has nothing to do with the ... If so you may want to leave this folder alone. ... down to all children folders because i can set those permissions to ... try deleting from the command line using system by using the AT ...
    (microsoft.public.windowsxp.security_admin)