Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

43 lignes
2.8 KiB

  1. <?xml version="1.0"?>
  2. <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  3. <!-- Insert global system.web node in any case -->
  4. <system.web xdt:Transform="InsertIfMissing">
  5. </system.web>
  6. <!-- Search for system.web nodes:
  7. - globally
  8. - under location[@path='.']
  9. - under location[count(@path)=0]
  10. If any of above contains httpModules section - it will be reused.
  11. Otherwise it will be created under /configuration/system.web (globally)
  12. -->
  13. <system.web xdt:Locator="XPath(//system.web[(count(parent::location) = 0) or (count(parent::location[@path != '.' and count(@path) != 0]) = 0)])">
  14. <httpModules xdt:Transform="InsertIfMissing">
  15. <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" xdt:Transform="Remove" xdt:Locator="Match(type)"/>
  16. <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" xdt:Transform="InsertIfMissing" xdt:Locator="Match(type)"/>
  17. </httpModules>
  18. </system.web>
  19. <!-- Insert global system.web node in any case -->
  20. <system.webServer xdt:Transform="InsertIfMissing">
  21. </system.webServer>
  22. <!-- Only one validation node is allowed to be deinfed globally or in global location tags. See explanaition above for httpModules on how it works -->
  23. <system.webServer xdt:Locator="XPath(//system.webServer[(count(parent::location) = 0) or (count(parent::location[@path != '.' and count(@path) != 0]) = 0)])">
  24. <validation validateIntegratedModeConfiguration="false" xdt:Transform="InsertIfMissing" />
  25. </system.webServer>
  26. <!-- Only one modules node is allowed to be deinfed globally or in global location tags.
  27. Modules node may not be defined in the same place where validation node above is defined.
  28. We need to remove all customer-renamed modules as remove tag relies on module name attribute
  29. See explanaition above for httpModules on how it works
  30. -->
  31. <system.webServer xdt:Locator="XPath(//system.webServer[(count(parent::location) = 0) or (count(parent::location[@path != '.' and count(@path) != 0]) = 0)])">
  32. <modules xdt:Transform="InsertIfMissing">
  33. <remove name="ApplicationInsightsWebTracking" xdt:Transform="InsertIfMissing" xdt:Locator="Match(name)"/>
  34. <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" xdt:Transform="Remove" xdt:Locator="Match(type)"/>
  35. <add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" xdt:Transform="InsertIfMissing" xdt:Locator="Match(type)"/>
  36. </modules>
  37. </system.webServer>
  38. </configuration>