In order to allow a standard user under UAC to modify the EntLib Logging configuration, I've moved the location of the logs and the logging configuration to the \programData\MyCompany\MyApp folder. In the logging configuration, I can use an environment
variable in the file path, like this:
I'm using %ALLUSERSPROFILE% instead of c:\programData because of course you can't guarantee c:\programData is correct. Fortunately, using the environment variable here works. Unfortunately, it does not work in the app.config to point the EntLib
to the configuration, and I've had to resort to using the hard-coded path. Is there a way to tell the File Configuration Source to use a well known system folder (Environment.SpecialFolder.CommonApplicationData)?
<enterpriseLibrary.ConfigurationSource selectedSource="File Configuration Source">
<add name="File Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=18.104.22.168, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Would like this to be something like: