Access file denied - Urgent!!!

Discussion in 'ASP .Net Security' started by David Li, Oct 20, 2004.

  1. David Li

    David Li Guest

    Hi all,

    I was trying to read/write to a file under the ASP.NET web application's
    root directory. After some configurations, e.g. Enabling 'Impersonate',
    Assigning correct pemissions to ASPNET accounts for this file, the program
    ran very well. However when I put it on another server, it appears the
    system is trying to locate the file under "C:\Winnt\System32" and I got
    "Unauthorized Exception". This file IS under the web application root
    directory, and I tried to put "~/" or "./" before the file name, it didn't
    work either! Any ideas? Thank you in advance!!!


    David
     
    David Li, Oct 20, 2004
    #1
    1. Advertising

  2. David Li

    Paul Clement Guest

    On Wed, 20 Oct 2004 08:29:35 -0500, "David Li" <> wrote:

    ¤ Hi all,
    ¤
    ¤ I was trying to read/write to a file under the ASP.NET web application's
    ¤ root directory. After some configurations, e.g. Enabling 'Impersonate',
    ¤ Assigning correct pemissions to ASPNET accounts for this file, the program
    ¤ ran very well. However when I put it on another server, it appears the
    ¤ system is trying to locate the file under "C:\Winnt\System32" and I got
    ¤ "Unauthorized Exception". This file IS under the web application root
    ¤ directory, and I tried to put "~/" or "./" before the file name, it didn't
    ¤ work either! Any ideas? Thank you in advance!!!
    ¤

    Are you using Server.MapPath to specify the location of the file?


    Paul ~~~
    Microsoft MVP (Visual Basic)
     
    Paul Clement, Oct 20, 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. Mark Kamoski
    Replies:
    1
    Views:
    2,453
  2. David Li

    Accessing file denied - Urgent!!!

    David Li, Oct 20, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    331
    Scott Allen
    Oct 20, 2004
  3. Ros@
    Replies:
    3
    Views:
    626
  4. Jay
    Replies:
    2
    Views:
    1,087
  5. Renjith

    Access denied URGENT!!!!!!!!!!!

    Renjith, Nov 23, 2005, in forum: ASP General
    Replies:
    3
    Views:
    94
    McKirahan
    Nov 23, 2005
Loading...

Share This Page