Tony, I tried StreamWriter for the folder and I can create files and write text into it.
Thanks. Ling --- Tony Wang <[EMAIL PROTECTED]> wrote: > Hi, > > It may be related to security. You have to set the > log folder to be writable by the IIS user, this is > The case at least in Win2K, and WinXP. > > Tony > > > > > > -----Original Message----- > From: Ling Wang [mailto:[EMAIL PROTECTED] > Sent: Monday, September 12, 2005 3:13 PM > To: [email protected]; Zarar Siddiqi > Subject: Re: Debug SQL Statement, Log4net help > needed > > > Zarar, > > I did what you are suggesting. Still no luck finding > where log.txt is. > Here is my assembly.cs file: > > using System.Reflection; > using System.Runtime.CompilerServices; > > [assembly: AssemblyTitle("NPetShop")] > [assembly: AssemblyDescription("Fully functional web > application based > on iBATIS.NET")] > [assembly: AssemblyConfiguration("")] > [assembly: AssemblyCompany("")] > [assembly: AssemblyProduct("")] > [assembly: AssemblyCopyright("Gilles Bayon")] > [assembly: AssemblyTrademark("")] > [assembly: AssemblyCulture("")] > > [assembly: > log4net.Config.DOMConfigurator(Watch=true)] > > > [assembly: AssemblyVersion("1.0.0.*")] > > [assembly: AssemblyDelaySign(false)] > [assembly: AssemblyKeyFile("")] > [assembly: AssemblyKeyName("")] > > and here is my web.config file: > > > <?xml version="1.0" encoding="utf-8" ?> > <configuration> > > <configSections> > <section name="log4net" > type="log4net.Config.Log4NetConfigurationSectionHandler, > log4net" /> > </configSections> > > <appSettings> > <add key="StrutsConfigFile" > value="nstruts-config.xml" /> > <add key="log4net.Internal.Debug" value="true"/> > </appSettings> > > <system.web> > <compilation > defaultLanguage="c#" > debug="true" > /> > > <customErrors > mode="RemoteOnly" > /> > > <authentication mode="Windows" /> > > <authorization> > <allow users="*" /> <!-- Allow all users --> > <!-- <allow users="[comma separated > list of users]" > roles="[comma separated > list of roles]"/> > <deny users="[comma separated > list of users]" > roles="[comma separated > list of roles]"/> > --> > </authorization> > > <trace > enabled="false" > requestLimit="10" > pageOutput="false" > traceMode="SortByTime" > localOnly="true" > /> > > <sessionState > mode="InProc" > > stateConnectionString="tcpip=127.0.0.1:42424" > sqlConnectionString="data > source=127.0.0.1;Trusted_Connection=yes" > cookieless="false" > timeout="20" > /> > > <globalization > requestEncoding="utf-8" > responseEncoding="utf-8" > /> > </system.web> > > <!-- This section contains the log4net > configuration > settings --> > <log4net> > <!-- Define some output appenders --> > <appender name="RollingLogFileAppender" > type="log4net.Appender.RollingFileAppender"> > <param name="File" value="log.txt" /> > <param name="AppendToFile" value="true" /> > <param name="MaxSizeRollBackups" value="2" /> > <param name="MaximumFileSize" value="100KB" /> > <param name="RollingStyle" value="Size" /> > <param name="StaticLogFileName" value="true" /> > <layout type="log4net.Layout.PatternLayout"> > <param name="Header" value="[Header]\r\n" /> > <param name="Footer" value="[Footer]\r\n" /> > <param name="ConversionPattern" value="%d [%t] > %-5p %c [%x] - %m%n" /> > </layout> > </appender> > <appender name="ConsoleAppender" > type="log4net.Appender.ConsoleAppender"> > <layout type="log4net.Layout.PatternLayout"> > <param name="ConversionPattern" value="%d [%t] > %-5p %c [%x] <%X{auth}> - %m%n" /> > </layout> > </appender> > > <!-- OFF, FATAL, ERROR, WARN, INFO, DEBUG, ALL --> > <!-- Set root logger level to ERROR and its > appenders --> > <root> > <level value="ERROR" /> > <appender-ref ref="RollingLogFileAppender" /> > <appender-ref ref="ConsoleAppender" /> > </root> > > <!-- Print only messages of level DEBUG or above > in > the packages --> > <logger > name="IBatisNet.DataMapper.Commands.DefaultPreparedCommand"> > <level value="DEBUG" /> > </logger> > <logger > name="IBatisNet.DataMapper.Configuration.Cache.CacheModel"> > <level value="DEBUG" /> > </logger> > <logger name="IBatisNet.DataMapper.LazyLoadList"> > <level value="DEBUG" /> > </logger> > <logger name="IBatisNet.DataMapper.SqlMapSession"> > <level value="DEBUG" /> > </logger> > <logger > name="IBatisNet.Common.Transaction.TransactionScope"> > <level value="DEBUG" /> > </logger> > <logger name="IBatisNet.DataAccess.DaoSession"> > <level value="DEBUG" /> > </logger> > <logger > name="IBatisNet.DataAccess.Configuration.DaoProxy"> > <level value="DEBUG" /> > </logger> > <logger > name="IBatisNet.DataMapper.Configuration.Statements.PreparedStatementFac > tory"> > <level value="OFF" /> > </logger> > <logger > name="IBatisNet.DataMapper.Commands.IPreparedCommand"> > <level value="OFF" /> > </logger> > </log4net> > > > </configuration> > > > Thanks. > > Ling > > === message truncated ===

