3
votes

I have a ASP .Net MVC app which is using Application Insights for telemetry tracking. It works fine when debugging the application from any developer machine with localhost, but when deployed to our main development environment web server, the HTTP requests are no longer being tracked.

Everything else, including exception, dependencies, traces, are all being tracked properly. But HTTP requests are not. How can I find the cause of this issue? I'm not sure where to start.

We are using Application Insights SDK 2.5.0.61767. The config file is the same across all machines. Not sure what else could be causing it. Any suggestions welcome.

EDIT: I noticed it is also not collecting Server Response Time, Server Requests, and Failed Requests.

I have the following module configuration in the ApplicationInsights.config file:

<Add Type="Microsoft.ApplicationInsights.Web.RequestTrackingTelemetryModule, Microsoft.AI.Web">
  <Handlers>
    <!-- 
    Add entries here to filter out additional handlers: 

    NOTE: handler configuration will be lost upon NuGet upgrade.
    -->
    <Add>System.Web.Handlers.TransferRequestHandler</Add>
    <Add>Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RequestDataHttpHandler</Add>
    <Add>System.Web.StaticFileHandler</Add>
    <Add>System.Web.Handlers.AssemblyResourceLoader</Add>
    <Add>System.Web.Optimization.BundleHandler</Add>
    <Add>System.Web.Script.Services.ScriptHandlerFactory</Add>
    <Add>System.Web.Handlers.TraceHandler</Add>
    <Add>System.Web.Services.Discovery.DiscoveryRequestHandler</Add>
    <Add>System.Web.HttpDebugHandler</Add>
  </Handlers>
</Add>
1
is this deployed on IIS? which version?rogerdeuce
@rogerdeuce it is deployed to IIS 8.5blizz
maybe you're missing a specific telemetry module on the server? docs.microsoft.com/en-us/azure/application-insights/… Microsoft.ApplicationInsights.Web.RequestTrackingTelemetryModulerogerdeuce
googling that module in particular it looks like they are having a ton of issues with it in 2.4 and 2.5. Not what you want to hear, but it may not be something that you're doing wrongrogerdeuce
yeah blizz I'm seeing the same thing all over. One person had a transform that was supposed to help it. github.com/Microsoft/ApplicationInsights-dotnet-server/issues/… you can read through the reports here, but they're all works local, does not once deployedrogerdeuce

1 Answers

5
votes

Adding the following section to my web.config has fixed the issue for me.

<system.webServer>
  <modules>
      <add name="TelemetryCorrelationHttpModule" type="Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule, Microsoft.AspNet.TelemetryCorrelation" preCondition="integratedMode,managedHandler" />
      <add name="ApplicationInsightsHttpModule" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
  </modules>
</system.webServer>