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

R

RC

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
 
M

Michal Boleslav Mechura

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
 
Joined
Aug 28, 2008
Messages
19
Reaction score
0
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top