问题
Is anyone using ApplicationInsight successfully at the moment?
I have had nothing but trouble trying to get it to work.
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.
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.
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.
Is there any debug info available for AI so that if it happens again I can catch it?
All help and experience from others very much appreciated.
Cheers Mike
Added information:
I am running VS 2013 update 4.
All other software should be up to date.
Steps to reproduce:
- Start VS
- New Project
- MVC Project connected to ApplicationInsight
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);
}
Which doesn't make much sense as that line doesn't do anything in a clean MVC project.
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.
Thanks.
回答1:
I've experienced this issue as well, but fortunately Sergey Kanzhelev from the AI team was able to help me work around it.
Remove (or comment out) the following line from ApplicationInsights.config
:
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCollector.PerformanceCollectorModule, Microsoft.ApplicationInsights.Extensibility.PerfCollector"/>
Note that this is a termporary workaround, but I'm sure they'll be fixing it soon.
来源:https://stackoverflow.com/questions/27874790/applicationinsight-causing-website-to-hang-at-startup