ApplicationInsight造成网站挂在启动时挂在、启动时、网站、ApplicationInsight

2023-09-04 10:53:58 作者:气质流氓疯.ぐ

时使用ApplicationInsight成功的那一刻的人?

Is anyone using ApplicationInsight successfully at the moment?

我有什么,但麻烦设法得到它的工作。

I have had nothing but trouble trying to get it to work.

首先,我有很​​多的问题,VS拒绝创建一个新的网站,ApplicationInsight并添加ApplicationInsight到现有的网站。这些错误它给那里没用的。

Firstly I had lots of problems with VS refusing to create a new website with ApplicationInsight and with adding ApplicationInsight to an existing website. The errors it gave where next to useless.

我终于得到了一个新的网站,AI的工作在我的机器上(等待一段时间,这是从微软最初的问题,官方的回答后)。然而本网站突然开始挂在启动时完全没有错误消息或调试信息,我能找到。

I finally managed to get a new website with AI working on my machine (after waiting 'some time', which was the official answer to the initial problem from Microsoft). However this website suddenly started hanging on startup with absolutely no error message or debug info that I could find.

我浪费过了一天寻找到数据库的连接问题,因为这是我工作的时候才开始禁用AI前悬挂,并开始工作了。

I wasted over a day looking into DB connectivity issues as that is what I was working on when it started to hang before disabling AI and it started working again.

有没有调试信息可用于AI这样,如果它再次发生,我可以抓住它?

Is there any debug info available for AI so that if it happens again I can catch it?

所有帮助和经验,从别人非常AP preciated。

All help and experience from others very much appreciated.

干杯迈克

补充信息:

我运行VS 2013的更新4。

I am running VS 2013 update 4.

所有其他软件应是最新的。

All other software should be up to date.

重现步骤:

启动VS 新建项目 连接到ApplicationInsight MVC项目

这应该无法运行。它只是挂起,等待本地主机。如果添加一些断点那么它实际上似乎在Global.asax中挂起时,它注册的地区。

This should fail to run. It just hangs, waiting for localhost. If you add some breakpoints then it actually seems to hang in global.asax when it registers the areas.

    protected void Application_Start()
    {
        AreaRegistration.RegisterAllAreas();   <------------- hangs here
        FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
        RouteConfig.RegisterRoutes(RouteTable.Routes);
        BundleConfig.RegisterBundles(BundleTable.Bundles);
    }

这并没有太大的意义,因为该行不会做一个干净的MVC项目什么。

Which doesn't make much sense as that line doesn't do anything in a clean MVC project.

如果您在web.config中禁用AI该项目将再次合作。

If you disable AI in the web.config the project will work again.

<modules>
  <remove name="FormsAuthentication" />
  <remove name="ApplicationInsightsWebTracking" />
  <!--
    <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Extensibility.Web.RequestTracking.WebRequestTrackingModule, Microsoft.ApplicationInsights.Extensibility.Web" preCondition="managedHandler" />
  -->
</modules>

如果别人可以尝试复制这一点,将是一个很好的开始。

If someone else could try to replicate this that would be a great start.

感谢。

推荐答案

我已经经历过这个问题为好,但幸运的是谢尔盖Kanzhelev从AI团队能够帮我解决它。

I've experienced this issue as well, but fortunately Sergey Kanzhelev from the AI team was able to help me work around it.

删除(或注释掉)从下面的行 ApplicationInsights.config

Remove (or comment out) the following line from ApplicationInsights.config:

<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCollector.PerformanceCollectorModule, Microsoft.ApplicationInsights.Extensibility.PerfCollector"/>

请注意,这是一个termporary解决办法,但我敢肯定,他们很快就会修复它。

Note that this is a termporary workaround, but I'm sure they'll be fixing it soon.

 
精彩推荐