AzureDiagnostics因System.ArgumentException崩溃:已添加具有相同密钥的项
在最近的一次云服务部署中,我的应用程序事件日志中出现了很多错误。想必这是我们在Azure Diagnostics中错误配置了某些内容,而Azure Diagnostics无法优雅地处理这些内容。但具体是什么配置错误 每5分钟我就会得到这个: Source=AzureDiagnostics的第一个错误AzureDiagnostics因System.ArgumentException崩溃:已添加具有相同密钥的项,azure,azure-cloud-services,azure-diagnostics,Azure,Azure Cloud Services,Azure Diagnostics,在最近的一次云服务部署中,我的应用程序事件日志中出现了很多错误。想必这是我们在Azure Diagnostics中错误配置了某些内容,而Azure Diagnostics无法优雅地处理这些内容。但具体是什么配置错误 每5分钟我就会得到这个: Source=AzureDiagnostics的第一个错误 System.ArgumentException: An item with the same key has already been added. at System.Collection
System.ArgumentException: An item with the same key has already been added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at ApplicationInsightsExtension.WindowsEventLogPublisher..ctor(ILogger logger, ITelemetryClient client, String logTablesPath, IEnumerable`1 dataSources, ILocalTableReader tableReader, Dictionary`2 configProperties) in x:\bt\725234\repo\src\agent\extensions\AppInsightsExtension\Publishers\WindowsEventLogPublisher.cs:line 59
at ApplicationInsightsExtension.WAD2AIExtension.GetPublishersBasedOnConfig() in x:\bt\725234\repo\src\agent\extensions\AppInsightsExtension\WAD2AIExtension.cs:line 114
at ApplicationInsightsExtension.Program.Main(String[] args) in x:\bt\725234\repo\src\agent\extensions\AppInsightsExtension\Program.cs:line 43
然后错误源=.NET运行时
Application: ApplicationInsightsExtension.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException
Stack:
at ApplicationInsightsExtension.Program.Main(System.String[])
然后源错误=应用程序错误
Faulting application name: ApplicationInsightsExtension.exe, version: 33.3.11.0, time stamp: 0x57224d6d
Faulting module name: KERNELBASE.dll, version: 6.3.9600.18202, time stamp: 0x569e7eb1
Exception code: 0xe0434352
Fault offset: 0x0000000000008a5c
Faulting process id: 0x1504
Faulting application start time: 0x01d1bcb0c4a62a77
Faulting application path: C:\Resources\directory\403a5550e74e40448af87aa6c4d6183a.OUR.APP.NAME.DiagnosticStore\WAD0106\Package\Ext\ApplicationInsightsExtension\Commit\ApplicationInsightsExtension.exe
Faulting module path: D:\Windows\system32\KERNELBASE.dll
Report Id: 02a628df-28a4-11e6-80c2-00155dc05ef6
Faulting package full name:
Faulting package-relative application ID:
问题似乎出现在我的诊断配置>Windows事件日志中。我有两个
系统*代码>勾选,同时也系统![系统[(级别=1或级别=2)]]
。哦
我仍然会遇到这样的奇怪错误,但似乎并不重要
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Azure.Plugins.Diagnostics.dll.RoleInformation.get_IsWorkerRole()
我希望有人能回答这个问题。我也有同样的问题!这也帮我解决了。我公司的一个人犯了同样的错误。