I need some assistance with a logging issue I am having.
I am using Enterprise LIbrary 4.1 and the logging application block for multiple applications. I have a separate logging configuration file that contains 4 listeners total so the logging configuration is externalized from each applications app.config
Client A - File Listener
Client B- File Listener
Web A - Event Listener
Web B - Event Listener
The problem occurs when I use a user variable (%USERPROFILE%\AppData\Roaming\App\LogFiles\Tools.log) for the client file listeners log file location. When placed on the web server I get an error when logging is initialized. Here is the error.
The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter, null]) failed: Access to the path 'C:\Windows\system32\config\systemprofile\AppData\Roaming\App\LogFiles' is denied. (Strategy
type ConfiguredObjectStrategy, index 2)
If I remove the user variables from the file based listeners (remember client apps only) then everything works as expected.
Does anyone know of any way to execute this without splitting the configuration into two separate config files? I am trying to avoid doing this for maintenance and deployment reasons.