How to access files in %windows folder%/system32 by asp.net/c#??

Discussion in 'ASP .Net' started by RC, Jan 25, 2005.

  1. RC

    RC Guest

    I am going to read a file at windows system32 folder.....I found that I
    cannot access the folder by classes in System.IO...authentication
    failure....how can I read the files?

    Thanks
     
    RC, Jan 25, 2005
    #1
    1. Advertising

  2. Try granting more rights to the "ASPNET" account on your machine. This is
    the account under which ASP.NET applications run. For example, try making
    the account a member of the Administrators group, and then reboot the
    machine for the changes to take effect.

    Be warned, though, that this makes your machine potentially more vulnerable
    to attacks. What are you reading the files for, anyway? A well-behaved
    internet application shouldn't need to look in system folders.

    Michal

    --
    Michal Boleslav Mechura


    "RC" <> wrote in message
    news:%...
    >I am going to read a file at windows system32 folder.....I found that I
    > cannot access the folder by classes in System.IO...authentication
    > failure....how can I read the files?
    >
    > Thanks
    >
    >
     
    Michal Boleslav Mechura, Jan 25, 2005
    #2
    1. Advertising

  3. RC

    qvo178

    Joined:
    Aug 28, 2008
    Messages:
    19
    Perhaps you need to read from C:\Windows instead of %windows folder%/system32. For how to read system environment variable to this: w w w.itjungles.com/dotnet/finding-windows-folder-with-c
     
    qvo178, Apr 30, 2010
    #3
    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. JT
    Replies:
    1
    Views:
    1,871
    bruce barker
    Feb 5, 2005
  2. Steve
    Replies:
    3
    Views:
    3,460
    Steve
    Jul 28, 2004
  3. linear
    Replies:
    3
    Views:
    1,016
    Fei Liu
    Apr 20, 2006
  4. veeru
    Replies:
    1
    Views:
    1,553
  5. Replies:
    0
    Views:
    1,902
Loading...

Share This Page