我使用 Visual Studio 2013 Update 4 创建了一个新的 ASP.net MVC 应用程序并选中该框以使用 Application Insights。当我尝试运行应用程序(有或没有调试)时,站点永远不会加载。当我调试它时,我注意到它卡在 Global.asax.cs 中:
AreaRegistration.RegisterAllAreas();
我查看了其他几个问题的答案,包括这个: AreaRegistration.RegisterAllAreas() is not Registering Rules For Area
这并没有解决我的问题。我已经删除了这个答案中文件夹中的所有内容并重新启动了 Visual Studio,重新启动了我的电脑,无论我做什么,这个方法都会永远挂起。它似乎不只是慢,因为我已经等了超过 5 分钟,它还没有完成。有没有其他人遇到过这种情况,除了删除这个电话外,我该如何解决?
如果我注释掉 Application Insights 的 Http 模块注册,那么这个方法会立即完成,但是一旦我将它们添加回来,该方法就会再次挂起。AreaRegistration.RegisterAllAreas() 调用和 Application Insights 似乎存在一些问题。
<httpModules>
<!-- removing this makes everything work -->
<!-- <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Extensibility.Web.RequestTracking.WebRequestTrackingModule, Microsoft.ApplicationInsights.Extensibility.Web" /> -->
</httpModules>
<modules>
<remove name="FormsAuthentication" />
<!-- removing these makes things work -->
<!--
<remove name="ApplicationInsightsWebTracking" />
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Extensibility.Web.RequestTracking.WebRequestTrackingModule, Microsoft.ApplicationInsights.Extensibility.Web" preCondition="managedHandler" />
-->
</modules>