> I'm try to log messages to Oracle database. I got the > following debug errors when run my application. > > -------------------------------------------------------------- > ----------------------------------------------------------------- > log4net:ERROR [ADONetAppender] Failed to load connection type > [System.Data.Oracl > eClient.OracleConnection,System.Data.OracleClient, > Version=1.2.0.30714, Culture= neutral,PublicKeyToken=b32731d11ce58905] > System.IO.FileLoadException: The located assembly's manifest > definition with nam e 'System.Data.OracleClient' does not > match the assembly reference.
This means that the assembly specified in the config file for the OracleClient does not match the manifest of the System.Data.OracleClient.dll assembly found on disk. In the config file you have specified the ADO.NET provider to use as: System.Data.OracleClient.OracleConnection,System.Data.OracleClient, Version=1.2.0.30714, Culture=neutral,PublicKeyToken=b32731d11ce58905 The version number and public key are not correct for the System.Data.OracleClient assembly. Try the following: Version=1.0.3300.0 PublicKeyToken=b77a5c561934e089 If you still get the same error then you will need to find your System.Data.OracleClient assembly and find the correct version number and public key token from the file. You can get the version from the file properties dialog. To get the public key token you need to use sn.exe with the -t option. Sn.exe is shipped with the .net SDK in VisualStudio. Nicko > File name: "System.Data.OracleClient" > at System.Type.GetType(String typeName, Boolean throwOnError) > at log4net.Appender.ADONetAppender.ResolveConnectionType() > > === Pre-bind state information === > LOG: DisplayName = System.Data.OracleClient, > Version=1.2.0.30714, Culture=neutra l, PublicKeyToken=b32731d11ce58905 > (Fully-specified) > LOG: Appbase = C:\hv\HF > Security\Log4net\log4net-1.2.0-beta8\examples\net\1.0\Tu > torials\ConsoleApp\cs\build\debug\ > LOG: Initial PrivatePath = NULL > Calling assembly : log4net, Version=1.2.0.30714, > Culture=neutral, PublicKeyToken =b32731d11ce58905. > === > > LOG: Publisher policy file is not found. > LOG: Host configuration file not found. > LOG: Using machine configuration file from > C:\WINDOWS\Microsoft.NET\Framework\v1 > .1.4322\config\machine.config. > LOG: Post-policy reference: System.Data.OracleClient, > Version=1.2.0.30714, Cultu re=neutral, PublicKeyToken=b32731d11ce58905 > LOG: Attempting download of new URL file:///C:/hv/HF > Security/Log4net/log4net-1. > 2.0-beta8/examples/net/1.0/Tutorials/ConsoleApp/cs/build/debug > /System.Data.Oracl > eClient.DLL. > WRN: Comparing the assembly name resulted in the mismatch: > Minor Version > > -------------------------------------------------------------- > --------------------------------------------------------------- > > The following is the ADONetAppender portion of my config > file. Does anyone know what is wrong? > > -------------------------------------------------------------- > -------------------------------------------------------------- > <appender name="ADONetAppender_Oracle" > type="log4net.Appender.ADONetAppender" > > <param name="ConnectionType" > value="System.Data.OracleClient.OracleConnection,System.Data.O > racleClient, Version=1.2.0.30714, > Culture=neutral,PublicKeyToken=b32731d11ce58905" /> > <param name="ConnectionString" > value="data source=[netbltsdb1];User ID=[docex];Password=[docex]" /> > <param name="CommandText" > value="INSERT INTO Log (Datetime, > Thread,Log_Level,Logger,Message) VALUES > (:log_date,:thread,:log_level,:logger,:message)" /> > <param name="BufferSize" value="128" /> > <param name="Parameter"> > <param name="ParameterName" > value=":log_date" /> > <param name="DbType" value="Date" /> > <param name="Layout" > type="log4net.Layout.RawTimeStampLayout" /> > </param> > <param name="Parameter"> > <param name="ParameterName" > value=":thread" /> > <param name="DbType" value="String" /> > <param name="Size" value="255" /> > <param name="Layout" > type="log4net.Layout.PatternLayout"> > <param > name="ConversionPattern" value="%t" /> > </param> > </param> > <param name="Parameter"> > <param name="ParameterName" > value=":log_level" /> > <param name="DbType" value="String" /> > <param name="Size" value="50" /> > <param name="Layout" > type="log4net.Layout.PatternLayout"> > <param > name="ConversionPattern" value="%p" /> > </param> > </param> > <param name="Parameter"> > <param name="ParameterName" > value=":logger" /> > <param name="DbType" value="String" /> > <param name="Size" value="255" /> > <param name="Layout" > type="log4net.Layout.PatternLayout"> > <param > name="ConversionPattern" value="%c" /> > </param> > </param> > <param name="Parameter"> > <param name="ParameterName" > value=":message" /> > <param name="DbType" value="String" /> > <param name="Size" value="4000" /> > <param name="Layout" > type="log4net.Layout.PatternLayout"> > <param > name="ConversionPattern" value="%m" /> > </param> > </param> > </appender> > -------------------------------------------------------------- > -------------------------------------------------------------- > -------- > > Thank you in advance. > > Ping Xie > > CACI > 4831 Walden Lane > Lanham, MD 20706 > [EMAIL PROTECTED] > (301) 306-8200 - Main > (301) 306-2829 - Direct > >