H I am trying to use the Logging Module provided by Microsoft Application Blocks for .Net I installed everything as per the Instructions given in the 'Development Using the Logging Block' But when i am trying to run the sample, i am getting the following error in the Event Viwer Kindly help me on this Waiting for your reply ---------------Error Messge in Event Viewer----------------------- Unable to read and validate the configuration file C:\Program Files\Microsoft Application Blocks for .Net\Logging\Samples\VB\LogLevelSample\bin\EnterpriseInstrumentation.config. The following type(s) cannot be loaded Microsoft.ApplicationBlocks.Logging.EventSinks.WmiEventSink, Microsoft.ApplicationBlocks.Logging.EventSinks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.EventSinks.BasicLogEventSink, Microsoft.ApplicationBlocks.Logging.EventSinks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.EventSinks.LogEventSink, Microsoft.ApplicationBlocks.Logging.EventSinks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.EventSinks.LogEventSink, Microsoft.ApplicationBlocks.Logging.EventSinks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.EventSinks.MsmqEventSink, Microsoft.ApplicationBlocks.Logging.EventSinks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.EventSinks.SqlServerEventSink, Microsoft.ApplicationBlocks.Logging.EventSinks, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.MeteringEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.AdministrativeEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.AuditEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.AuditMessageEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.AuditOperationEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.BaseEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.CommonEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.ComPlusInfo, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.DiagnosticEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.ErrorEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.ErrorMessageEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.ExternalErrorEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.ExternalErrorMessageEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a7 Microsoft.ApplicationBlocks.Logging.Schema.InternalErrorEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.InternalErrorMessageEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.ManagedSecurityInfo, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.TraceCallEnterEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.TraceCallEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.TraceCallReturnEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.TraceDatabaseCommandEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.TraceDatabaseEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.TraceEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.TraceExternalCallEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.TraceExternalEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.TraceExternalReturnEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.TraceMessageEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.WindowsSecurityInfo, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.AdministrativeEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79 Microsoft.ApplicationBlocks.Logging.Schema.AdminMessageEvent, Microsoft.ApplicationBlocks.Logging.Schema, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cd42fb0c69be8a79
The problem is that the public key that you have in the .config files doesn't match the one in the GAC Run this: C:\Program Files\Microsoft Application Blocks for .Net\Logging>gacutil /l Micros oft.applicationblocks.logging.schema copy the key do a replace in both .config files It should work. ---
Yes You are right Once i changed the Public Key Token in the .config files, its working fine thanks ---
After I changed the public key token, I get three events everytime I run this program, two Information and 1 Error. Is it supposed to be like this? -tc [quoted text, click to view] "Karuppasamy" <siva_prakash75@-NOSPAM-hotmail.com> wrote in message news:eSXtZOYvDHA.2540@TK2MSFTNGP09.phx.gbl... > Yes You are right. > > Once i changed the Public Key Token in the .config files, its working fine. > > thanks > > --- > Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/
Yes. Commenting the following code from LogLevelSamples.cs removes the error event. /* ErrorMessageEvent errorMessageEvent = new ErrorMessageEvent(); errorMessageEvent.Severity = 2; errorMessageEvent.Message = "ErrorMessageEvent"; errorMessageEvent.EventPublishLogLevel = (int)LogLevel.Error; EventSource.Application.Raise(errorMessageEvent); */ -tc [quoted text, click to view] "tcw" <tcwangs@msn.com> wrote in message news:uIT8tcR6DHA.1968@TK2MSFTNGP11.phx.gbl... > After I changed the public key token, I get three events everytime I run > this program, two Information and 1 Error. Is it supposed to be like this? > > -tc > > > "Karuppasamy" <siva_prakash75@-NOSPAM-hotmail.com> wrote in message > news:eSXtZOYvDHA.2540@TK2MSFTNGP09.phx.gbl... > > Yes You are right. > > > > Once i changed the Public Key Token in the .config files, its working > fine. > > > > thanks > > > > --- > > Posted using Wimdows.net Newsgroups - http://www.wimdows.net/newsgroups/ > >
Don't see what you're looking for? Try a search.
|