Sounds like a rights problem. Check if the IIS User can create directory
and files.

Marry christmas

Steve

Rafferty Uy schrieb:
> Hi,
> 
> I'm having problems getting logs to work. Here are some configuration 
> snippets.
> 
> // -- IN MY LOG4NET.XML ------------------------------------------
> <?xml version="1.0" encoding="utf-8" ?>
> <!-- This section contains the log4net configuration settings -->
> <!-- See http://logging.apache.org/log4net/release/manual/introduction.html 
> for more information -->
> <log4net>
>       <appender name="FileAppender" type="log4net.Appender.FileAppender">
>             <file value="data/ErrorTrace.txt" />
>             <appendToFile value="true" />
>             <layout type="log4net.Layout.PatternLayout">
>                   <conversionPattern value="%d %-5level %logger - 
> %message%newline" />
>             </layout>
>       </appender>
> 
>       <!-- Possible levels: ALL, DEBUG, INFO, WARN, ERROR, FATAL, OFF -->
>       <root>
>             <level value="ALL" />
>       </root>
> 
>       <logger name="MyWebAppLogger">
>             <level value="ALL" />
>             <appender-ref ref="FileAppender" />
>       </logger>
> </log4net>
> 
> // -- IN MY WEB.CONFIG -------------------------------------------
> <add key="log4netXmlPath" value="log4net.xml"/>
> 
> 
> // -- IN MY GLOBAL.ASAX.CS ---------------------------------------
> protected void Application_Start(object sender, EventArgs e)
> {
>       var config = new FileInfo(configPath);
>       log4net.Config.XmlConfigurator.ConfigureAndWatch(config);
> }
> 
> 
> What could be wrong? For some reason when I enter debug mode through visual 
> studio (by pressing F5), it correctly creates the data sub directory as well 
> as the ErrorTrace.txt. However, it does not work when I copy the release 
> files to my IIS virtual directory.
> *Additional note: the virtual directory is configured to have write access.
> 
> Can anyone help?
> 
> 
> Rafferty
> 
> Best regards / mit freundlichen Grüßen,
> 
> Rafferty Uy
> Software Engineer
> 
> ease solutions Pte. Ltd.
> 30B Temple Street
> Singapore 058575
> 
> Tel: +65 6220 7488
> Fax: +65 6223 0815
> 
> Web: www.easesolutions.com
> Email: [email protected]<mailto:[email protected]>
> 
> 

Reply via email to