-
Notifications
You must be signed in to change notification settings - Fork 293
Description
Describe your environment.
Two request telemetry are getting created for the requests which are processed with IIS UrlRewrite module
- SDK version: 2.13.1
- .NET runtime version (.NET or .NET Core, TargetFramework in the .csproj file): 4.7.2
- Hosting Info (IIS/Azure WebApps/etc): IIS / App Service with URL Rewrite module
- Platform and OS version: Windows 10 (IIS 10)
Steps to reproduce.
Describe exactly how to reproduce the error. Include a code sample if applicable.
- Create default ASP.NET MVC app, install ApplicationInsights SDK, set up ikey to send data
- Host it on IIS
- Create rewrite rule as following:
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules>
<remove name="TelemetryCorrelationHttpModule" />
<add name="TelemetryCorrelationHttpModule" type="Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule, Microsoft.AspNet.TelemetryCorrelation" preCondition="managedHandler" />
<remove name="ApplicationInsightsWebTracking" />
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
</modules>
<rewrite>
<rules>
<rule name="AboutRedirect" stopProcessing="true">
<match url="Home/About" />
<action type="Rewrite" url="home/index" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
- Hit the webpage “http://localhost/Home/About” – as expected the index page will be displayed.
- Navigate to Application Insights resource and observe following:
What is the expected behavior?
What did you expect to see?
Only one entry should be displayed.
What is the actual behavior?
What did you see instead?
Right now this is a double logging for the same request.
Additional context.
Collected Perfview to investigate an issue. ASP.NET pipeline is considering it has two different request. Microsoft-Windows-ASPNET/Request/Start and Microsoft-Windows-ASPNET/Request/Stop are called for actual request and rewritten request.
Further investigation required to understand if this needs to be fixed in Application Insights SDK or at the ASP.NET framework.
Below snapshot are from Perfview trace collected on my machine.


