- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我在 IIS 7(本地 Windows 10 专业版)下有两个 Web 应用程序。根是 MVC .Net 版本 4.7.1。到目前为止,这里的一切似乎都运行良好。但是,在默认站点根目录下设置为单独的应用程序是较旧的 .Net 4.0 版 WebForms 应用程序。
第 4 版应用程序是在 Visual Studio 2015 中构建的,MVC 是使用 Visual Studio 2017 构建的。我让第 4 版 WebForms 应用程序在具有相同设置的不同网站下运行,并且运行良好。它只有在作为不同应用程序在根节点下运行时才会出现问题。我还尝试在两个应用程序上使用不同的应用程序池,以及使用相同的应用程序池,但错误没有发生变化。
我也尝试过卸载 ApplicationInsights 并禁用它,但我遇到了同样的问题。
[FileNotFoundException: Could not load file or assembly 'Microsoft.AspNet.TelemetryCorrelation' or one of its dependencies. The system cannot find the file specified.] System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type) +0 System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName) +95 System.Type.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +64 System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +60 System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +49
[ConfigurationErrorsException: Could not load file or assembly 'Microsoft.AspNet.TelemetryCorrelation' or one of its dependencies. The system cannot find the file specified.] System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, XmlNode node, Boolean checkAptcaBit, Boolean ignoreCase) +558 System.Web.Configuration.ConfigUtil.GetType(String typeName, String propertyName, ConfigurationElement configElement, Boolean checkAptcaBit) +30 System.Web.Configuration.Common.ModulesEntry.SecureGetType(String typeName, String propertyName, ConfigurationElement configElement) +57 System.Web.Configuration.Common.ModulesEntry..ctor(String name, String typeName, String propertyName, ConfigurationElement configElement) +57 System.Web.HttpApplication.BuildIntegratedModuleCollection(List`1 moduleList) +182 System.Web.HttpApplication.GetModuleCollection(IntPtr appContext) +1086 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +120 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +169 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +372 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +329
[HttpException (0x80004005): Could not load file or assembly 'Microsoft.AspNet.TelemetryCorrelation' or one of its dependencies. The system cannot find the file specified.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +525 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +118 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +708
最佳答案
在我的例子中,子应用没有使用 ApplicationInsights,我将这些排除项添加到子应用 web.config 文件中。它解决了问题。
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<modules runAllManagedModulesForAllRequests="false">
<remove name="TelemetryCorrelationHttpModule" />
<remove name="ApplicationInsightsWebTracking" />
</modules>
</system.webServer>
</configuration>
这是我找到答案的讨论主题 https://github.com/aspnet/Microsoft.AspNet.TelemetryCorrelation/issues/21#issuecomment-508535397
我的回答是一个迟到的答案,但它可能对其他人有帮助。
关于c# - 无法加载文件或程序集 'Microsoft.AspNet.TelemetryCorrelation' 或其依赖项之一。该系统找不到指定的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50949255/
我在 IIS 7(本地 Windows 10 专业版)下有两个 Web 应用程序。根是 MVC .Net 版本 4.7.1。到目前为止,这里的一切似乎都运行良好。但是,在默认站点根目录下设置为单独的应
Application Insight 未在 Azure Application Insight 仪表板中显示服务器请求数据。在直播过程中我遇到了以下错误。 Microsoft.Application
Application Insight 未在 Azure Application Insight 仪表板中显示服务器请求数据。在直播过程中我遇到了以下错误。 Microsoft.Application
我是一名优秀的程序员,十分优秀!