Enterprise library always logs @ c drive

Topics: Exception Handling Application Block, Logging Application Block
Feb 3, 2011 at 2:08 PM


Im new to EL. I have created a small sample using el logging aplication block. When i run on my local machine XP, it create log perfectly @ location %APPDATA%\ApplicationName\Log.log But when i run the application on windows server 2003 it logs the information in C: drive inspite of application data folder . can any1 help me on this. Is this issue of W3WP.exe process not hving access on %APPDATA% folder of server. Here is the setting


add fileName="%APPDATA%\Appllication\Logs\AppLog.log" rollSizeKB="1024" timeStampPattern="dd-MM-yyyy" rollFileExistsBehavior="Increment" rollInterval="Day" formatter="Text Formatter" header="=======================================================================================================================================================================" footer="=======================================================================================================================================================================" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" traceOutputOptions="Timestamp" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35" name="AppLog" 

Feb 4, 2011 at 12:25 AM

Have you tried verifying the actual folder location of the APPDATA environment variable in that windows server machine?  I'll look into this but you might also get an answer from some windows server 2003 forums since this looks more like an environment-related issue. 


Sarah Urmeneta
Global Technologies and Solutions
Avanade, Inc.