web.config.install.xdt 1.5 KB

12345678910111213141516171819202122232425
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  3. <system.webServer xdt:Transform="InsertIfMissing">
  4. </system.webServer>
  5. <!-- Search for system.web nodes:
  6. - globally
  7. - under location[@path='.']
  8. - under location[count(@path)=0]
  9. If any of above contains httpModules section - it will be reused.
  10. Otherwise it will be created under /configuration/system.web (globally)
  11. see https://github.com/Microsoft/ApplicationInsights-dotnet-server/blob/develop/Src/Web/Web.Nuget/Resources/web.config.install.xdt
  12. -->
  13. <system.webServer xdt:Locator="XPath(//system.webServer[(count(parent::location) = 0) or (count(parent::location[@path != '.' and count(@path) != 0]) = 0)])">
  14. <modules xdt:Transform="InsertIfMissing">
  15. <remove name="TelemetryCorrelationHttpModule" xdt:Transform="InsertIfMissing" xdt:Locator="Match(name)"/>
  16. <add name="TelemetryCorrelationHttpModule" type="Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule, Microsoft.AspNet.TelemetryCorrelation"
  17. preCondition="integratedMode,managedHandler" xdt:Transform="Remove" xdt:Locator="Match(type)"/>
  18. <add name="TelemetryCorrelationHttpModule" type="Microsoft.AspNet.TelemetryCorrelation.TelemetryCorrelationHttpModule, Microsoft.AspNet.TelemetryCorrelation"
  19. preCondition="integratedMode,managedHandler" xdt:Transform="InsertIfMissing" xdt:Locator="Match(type)"/>
  20. </modules>
  21. </system.webServer>
  22. </configuration>