2

We have an Azure web app with AI configured.

The module from AI is added like this:

<modules >
        <remove name="ApplicationInsightsWebTracking" />
        <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
    </modules>

We want the precondition, because we don't want static files to be captured but when using the precondition, https traffic never gets captured, while http traffic does.

Any ideas how to use the precondition="managed" but making sure https traffic is also captured by AI?

Identity
  • 1,553
  • 1
  • 22
  • 44

1 Answers1

0

For one or the other reason, adding the httpmodule for classic mode solved my problem.

Anyone who can explain this?

Identity
  • 1,553
  • 1
  • 22
  • 44
  • I am sure that preCondition="managedHandler" will capture https traffic for you if you run your application in integrated mode. I suggest you double check which mode did your web application run with and just remove the classic mode httpmodule and test again. – Amor Mar 23 '17 at 10:26
  • I was able to fix the issue by removing preCondition="managedHandler" for the AI module. (Running in integrated mode) – Identity Mar 23 '17 at 13:41
  • I am using ASP.NET 4.6 with owin middleware. For some reason, https traffic does not get captured when the preCondition is set. Could there be another reason why https traffic is not captured with this preCondition? – Identity Mar 31 '17 at 11:43
  • @Amor-MSFT Could the url rewrite (2.0) from http to https have any impact? – Michiel Cornille Apr 03 '17 at 07:58
  • No, I also test url rewrite on my project(ASP.NET 4.6). I can see the https traffic are logged. I used the rewrite configuration from following thread. http://stackoverflow.com/questions/47089/best-way-in-asp-net-to-force-https-for-an-entire-site – Amor Apr 06 '17 at 07:30