1

我正在为我的 ASP.NET MVC 应用程序使用语义日志记录。https://github.com/mspnp/semantic-logging(SQL数据库)通过nuget安装

Install-Package EnterpriseLibrary.SemanticLogging.Database

这是引发异常的代码。

var blockEventListener = new ObservableEventListener();
blockEventListener.EnableEvents(SemanticLoggingEventSource.Log, EventLevel.LogAlways, Keywords.All);

在我使用 IIS Express 的开发平台中,我没有任何异常,但是当我将其上传到 IIS 8.0 时,出现以下异常。

[ArgumentException: Keywords values larger than 0x0000100000000000 are reserved for system use]   
System.Diagnostics.Tracing.EventSource.CreateManifestAndDescriptors(Type eventSourceType, String eventSourceDllName, EventSource source) +14523758
System.Diagnostics.Tracing.EventSource.EnsureInitialized() +103
System.Diagnostics.Tracing.EventSource.SendCommand(EventListener listener, Int32 perEventSourceSessionId, Int32 etwSessionId, EventCommand command, Boolean enable, EventLevel level, EventKeywords matchAnyKeyword, IDictionary`2 commandArguments) +6352938
System.Diagnostics.Tracing.EventListener.EnableEvents(EventSource eventSource, EventLevel level, EventKeywords matchAnyKeyword) +71
4

0 回答 0