Application Insights导致w3wp崩溃

时间:2018-06-29 14:33:34

标签: azure-application-insights

在Windows Server 2012 R2上使用AppInsights Monitor应用程序运行AI 2.4,以监视面向公众(发布)的SharePoint网站。

每隔一段时间,w3wp就会崩溃(抛出“ 您要调试它吗?”对话框),并且在事件日志中记录以下内容:

Exception: System.Runtime.Serialization.SerializationException

Message: Type is not resolved for member 'System.Diagnostics.Activity,System.Diagnostics.DiagnosticSource, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.

StackTrace:  at System.Web.Hosting.ApplicationManager.HostingEnvironmentShutdownInitiated(String appId, HostingEnvironment env)
at System.Web.Hosting.HostingEnvironment.RemoveThisAppDomainFromAppManagerTableOnce()
at System.Web.Hosting.HostingEnvironment.InitiateShutdownInternal()
at System.Web.Hosting.HostingEnvironment.InitiateShutdownWithoutDemand()
at System.Web.HttpRuntime.ShutdownAppDomain(String stackTrace)
at System.Web.Compilation.DiskBuildResultCache.ShutdownCallBack(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()

似乎我遇到了这个问题:https://github.com/Microsoft/ApplicationInsights-dotnet-server/issues/613

我已经将System.Diagnostics.DiagnosticSource(版本4.5)DLL放入inetserv目录中,并且我已经更新了web.config以进行程序集重定向。但是,崩溃仍然发生。

我错过了一步吗?

1 个答案:

答案 0 :(得分:2)

System.Diagnostics.DiagnosticsSource 4.5.0(已修复的版本)的程序集版本为4.0.3.0。

从您的例外情况来看,您似乎仍在使用

  

System.Diagnostics.Activity,System.Diagnostics.DiagnosticSource,版本= 4.0.2.0

请检查您的绑定重定向,并检查您是否仍以某种方式引用4.4.0。您还可以启用fuslog来查看详细的绑定错误信息。