Groups | Blog | Home
all groups > dotnet security > june 2006 >

dotnet security : Where to store log file ?


serge calderara
6/20/2006 5:02:01 AM
Dear all,

I have build a WIndows application that is deployed under 2000 or XP
workstation.
If I set to 1 the entry in <Diagnostics> elements of App.config file, then
it generates log file entry under a LOG folder located below the Installation
Folder in Program File.

Now problem comes when I am logged in as a restricted user, by default it
does not have write access to Program File folder, so it generates an IO
securtity execpetion when attempting to write under Program
File\myApplication\log

My question is :
Where is the best place to store such log files, mainly used as debug
purpose ?

Thanks for your help
Dominick Baier [DevelopMentor]
6/20/2006 12:08:51 PM
use the profile of the current interactive user.

you get the necessary paths using:

Environment.GetFolderPath(specialfolder)

the LocalApplicationData special folder may be the right one.

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

[quoted text, click to view]

AddThis Social Bookmark Button