File System Access

Discussion in 'ASP .Net' started by MichaelR, Dec 14, 2004.

  1. MichaelR

    MichaelR Guest

    I have an ASP.NET application running on the 1.1 Framework on 2 servers just
    fine. However, on one server (Windows Server 2003) I'm having a problem.

    This particular line of code throws an exception when run through the Visual
    Studio 2003 debugger:

    objFileStream = New
    FileStream(objHttpContext.Server.MapPath("/virdir1/subdir/mrConfig.dat"),
    FileMode.Open)
    The exception text is:

    Access to the path "C:\Inetpub\wwwroot\virdir1\subdir\mrConfig.dat" is
    denied."

    I've checked file system security on the directory and on the file itself.
    The user NETWORK SERVICE has full control over both. What else do I need to
    do to enable access?



    Thanks.
     
    MichaelR, Dec 14, 2004
    #1
    1. Advertising

  2. MichaelR

    Scott Allen Guest

    You might want to troubleshoot by enabling some auditing on the
    file/directory:

    http://www.pluralsight.com/keith/book/html/howto_auditfileaccess.html

    Peek in the Security log with Event Viewer just to double check the
    identity of the incoming user. With impersonation and all the other
    identity tricks in ASP.NET the answer can sometimes be suprising.

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    On Tue, 14 Dec 2004 14:16:02 -0500, "MichaelR"
    <> wrote:

    >I have an ASP.NET application running on the 1.1 Framework on 2 servers just
    >fine. However, on one server (Windows Server 2003) I'm having a problem.
    >
    >This particular line of code throws an exception when run through the Visual
    >Studio 2003 debugger:
    >
    >objFileStream = New
    >FileStream(objHttpContext.Server.MapPath("/virdir1/subdir/mrConfig.dat"),
    >FileMode.Open)
    >The exception text is:
    >
    >Access to the path "C:\Inetpub\wwwroot\virdir1\subdir\mrConfig.dat" is
    >denied."
    >
    >I've checked file system security on the directory and on the file itself.
    >The user NETWORK SERVICE has full control over both. What else do I need to
    >do to enable access?
    >
    >
    >
    >Thanks.
    >
     
    Scott Allen, Dec 14, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. S. Justin Gengo
    Replies:
    0
    Views:
    873
    S. Justin Gengo
    Jul 14, 2003
  2. Chris Pratt

    Remote file access system?

    Chris Pratt, Nov 23, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    366
    Arthur Nesterovsky
    Nov 23, 2003
  3. =?Utf-8?B?UmFzaG1pS3Vsa2k=?=

    cannot access a .aspx file from another system in local LAN

    =?Utf-8?B?UmFzaG1pS3Vsa2k=?=, Mar 31, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    599
    Alexey Smirnov
    Mar 31, 2006
  4. Peter

    JDBC access File system?

    Peter, Jan 9, 2004, in forum: Java
    Replies:
    10
    Views:
    5,279
    Chris Uppal
    Jan 10, 2004
  5. Rick
    Replies:
    1
    Views:
    581
    Walter Wang [MSFT]
    Sep 10, 2007
Loading...

Share This Page