microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.47k stars 2.61k forks source link

XML variable substitutions not working as expected #5892

Closed shaneholder closed 6 years ago

shaneholder commented 6 years ago

This is in relation to https://github.com/Microsoft/vsts-tasks/issues/5595

I have pulled down the code and I am trying to generate a fix for the above code but I'm having issues with the basic substitution code.

It seems that when connectionStrings are substituted the xmlDomLookUpTable is being modified, and subsequent lookups do not succeed so configSections never finds a node.

I've added logging to ltxdomutility.ts and xmlvariablesubstitutionutility.ts

What I see is that before the system does substitution on connectionString the xmlDomLookUpTable contains...sorry for this it's a ton of JSON, but I want to provide full context. There are 2 sections of JSON below one before the connectionStrings replacement and one when looking for configSections. You'll see that the entire document has changed, so when the system goes to look for configSections it's not there. I suspect that appSettings may only be working out of happenstance because it is processed before connectionStrings. I tried re-ordering the array of elements to look for in the document but they seem to keep getting ordered alphabetically when executed.

{
  "configuration": [
    {
      "name": "configuration",
      "attrs": {},
      "children": [
        "\r\n  ",
        {
          "name": "configSections",
          "attrs": {},
          "children": [
            "\r\n    ",
            {
              "name": "section",
              "attrs": {
                "name": "entityFramework",
                "type": "System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
                "requirePermission": "false"
              },
              "children": []
            },
            "\r\n  "
          ]
        },
        "\r\n  ",
        {
          "name": "connectionStrings",
          "attrs": {},
          "children": [
            "\r\n    ",
            {
              "name": "add",
              "attrs": {
                "name": "DefaultConnection",
                "conntype": "conntype",
                "connectionString": "Data Source=(LocalDb)\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\aspnet-AzureWebApp1-20160810012740.mdf;Initial Catalog=aspnet-AzureWebApp1-20160810012740;Integrated Security=True",
                "providerName": "System.Data.SqlClient"
              },
              "children": []
            },
            "\r\n    ",
            {
              "name": "add",
              "attrs": {
                "name": "OtherDefaultConnection",
                "conntype": "conntype",
                "connectionString": "Data Source=(LocalDb)\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\aspnet-AzureWebApp1-20160810012740.mdf;Initial Catalog=aspnet-AzureWebApp1-20160810012740;Integrated Security=True",
                "providerName": "System.Data.SqlClient"
              },
              "children": []
            },
            "\r\n    ",
            {
              "name": "add",
              "attrs": {
                "name": "InvalidName",
                "conntype": "conntype",
                "providerName": "System.Data.SqlClient"
              },
              "children": []
            },
            "\r\n    ",
            {
              "name": "add",
              "attrs": {
                "name": "ParameterConnection",
                "conntype": "conntype",
                "connectionString": "$(ReplacableToken_DefaultConnection-Web.config Connection String_0)"
              },
              "children": []
            },
            "\r\n    ",
            {
              "name": "add",
              "attrs": {
                "name": "NoConnectionName",
                "conntype": "conntype",
                "connectionString": "NoConnectionName"
              },
              "children": []
            },
            "\r\n  "
          ]
        },
        "\r\n  ",
        {
          "name": "appSettings",
          "attrs": {},
          "children": [
            "\r\n    ",
            {
              "name": "add",
              "attrs": {
                "key": "webpages:Version",
                "value": "CONFIG_FILE_SETTINGS_TOKEN(webpages:Version)"
              },
              "children": []
            },
            "\r\n    ",
            {
              "name": "add",
              "attrs": {
                "key": "webpages:Enabled",
                "value": "false"
              },
              "children": []
            },
            "\r\n    ",
            {
              "name": "add",
              "attrs": {
                "key": "ClientValidationEnabled",
                "value": "true"
              },
              "children": []
            },
            "\r\n    ",
            {
              "name": "add",
              "attrs": {
                "key": "UnobtrusiveJavaScriptEnabled",
                "value": "true"
              },
              "children": []
            },
            "\r\n  ",
            {
              "name": "add",
              "attrs": {
                "key": "rmappname",
                "value": "true"
              },
              "children": []
            },
            "\r\n  "
          ]
        },
        "\r\n  ",
        {
          "name": "system.web",
          "attrs": {},
          "children": [
            "\r\n    ",
            {
              "name": "authentication",
              "attrs": {
                "mode": "None"
              },
              "children": []
            },
            "\r\n    ",
            {
              "name": "compilation",
              "attrs": {
                "debug": "true",
                "targetFramework": "4.5.2"
              },
              "children": []
            },
            "\r\n    ",
            {
              "name": "httpRuntime",
              "attrs": {
                "targetFramework": "4.5.2"
              },
              "children": []
            },
            "\r\n    ",
            {
              "name": "httpModules",
              "attrs": {},
              "children": [
                "\r\n      ",
                {
                  "name": "add",
                  "attrs": {
                    "name": "ApplicationInsightsWebTracking",
                    "type": "Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"
                  },
                  "children": []
                },
                "\r\n    "
              ]
            },
            "\r\n  "
          ]
        },
        "\r\n  ",
        {
          "name": "system.webServer",
          "attrs": {},
          "children": [
            "\r\n    ",
            {
              "name": "modules",
              "attrs": {},
              "children": [
                "\r\n      ",
                {
                  "name": "remove",
                  "attrs": {
                    "name": "FormsAuthentication"
                  },
                  "children": []
                },
                "\r\n      ",
                {
                  "name": "remove",
                  "attrs": {
                    "name": "ApplicationInsightsWebTracking"
                  },
                  "children": []
                },
                "\r\n      ",
                {
                  "name": "add",
                  "attrs": {
                    "name": "ApplicationInsightsWebTracking",
                    "type": "Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web",
                    "preCondition": "managedHandler"
                  },
                  "children": []
                },
                "\r\n    "
              ]
            },
            "\r\n    ",
            {
              "name": "validation",
              "attrs": {
                "validateIntegratedModeConfiguration": "false"
              },
              "children": []
            },
            "\r\n  "
          ]
        },
        "\r\n  ",
        {
          "name": "runtime",
          "attrs": {},
          "children": [
            "\r\n    ",
            {
              "name": "assemblyBinding",
              "attrs": {
                "xmlns": "urn:schemas-microsoft-com:asm.v1"
              },
              "children": [
                "\r\n      ",
                {
                  "name": "dependentAssembly",
                  "attrs": {},
                  "children": [
                    "\r\n        ",
                    {
                      "name": "assemblyIdentity",
                      "attrs": {
                        "name": "Microsoft.Owin.Security",
                        "publicKeyToken": "31bf3856ad364e35"
                      },
                      "children": []
                    },
                    "\r\n        ",
                    {
                      "name": "bindingRedirect",
                      "attrs": {
                        "oldVersion": "0.0.0.0-3.0.1.0",
                        "newVersion": "3.0.1.0"
                      },
                      "children": []
                    },
                    "\r\n      "
                  ]
                },
                "\r\n      ",
                {
                  "name": "dependentAssembly",
                  "attrs": {},
                  "children": [
                    "\r\n        ",
                    {
                      "name": "assemblyIdentity",
                      "attrs": {
                        "name": "Microsoft.Owin.Security.OAuth",
                        "publicKeyToken": "31bf3856ad364e35"
                      },
                      "children": []
                    },
                    "\r\n        ",
                    {
                      "name": "bindingRedirect",
                      "attrs": {
                        "oldVersion": "0.0.0.0-3.0.1.0",
                        "newVersion": "3.0.1.0"
                      },
                      "children": []
                    },
                    "\r\n      "
                  ]
                },
                "\r\n      ",
                {
                  "name": "dependentAssembly",
                  "attrs": {},
                  "children": [
                    "\r\n        ",
                    {
                      "name": "assemblyIdentity",
                      "attrs": {
                        "name": "Microsoft.Owin.Security.Cookies",
                        "publicKeyToken": "31bf3856ad364e35"
                      },
                      "children": []
                    },
                    "\r\n        ",
                    {
                      "name": "bindingRedirect",
                      "attrs": {
                        "oldVersion": "0.0.0.0-3.0.1.0",
                        "newVersion": "3.0.1.0"
                      },
                      "children": []
                    },
                    "\r\n      "
                  ]
                },
                "\r\n      ",
                {
                  "name": "dependentAssembly",
                  "attrs": {},
                  "children": [
                    "\r\n        ",
                    {
                      "name": "assemblyIdentity",
                      "attrs": {
                        "name": "Microsoft.Owin",
                        "publicKeyToken": "31bf3856ad364e35"
                      },
                      "children": []
                    },
                    "\r\n        ",
                    {
                      "name": "bindingRedirect",
                      "attrs": {
                        "oldVersion": "0.0.0.0-3.0.1.0",
                        "newVersion": "3.0.1.0"
                      },
                      "children": []
                    },
                    "\r\n      "
                  ]
                },
                "\r\n      ",
                {
                  "name": "dependentAssembly",
                  "attrs": {},
                  "children": [
                    "\r\n        ",
                    {
                      "name": "assemblyIdentity",
                      "attrs": {
                        "name": "Newtonsoft.Json",
                        "culture": "neutral",
                        "publicKeyToken": "30ad4fe6b2a6aeed"
                      },
                      "children": []
                    },
                    "\r\n        ",
                    {
                      "name": "bindingRedirect",
                      "attrs": {
                        "oldVersion": "0.0.0.0-6.0.0.0",
                        "newVersion": "6.0.0.0"
                      },
                      "children": []
                    },
                    "\r\n      "
                  ]
                },
                "\r\n      ",
                {
                  "name": "dependentAssembly",
                  "attrs": {},
                  "children": [
                    "\r\n        ",
                    {
                      "name": "assemblyIdentity",
                      "attrs": {
                        "name": "System.Web.Optimization",
                        "publicKeyToken": "31bf3856ad364e35"
                      },
                      "children": []
                    },
                    "\r\n        ",
                    {
                      "name": "bindingRedirect",
                      "attrs": {
                        "oldVersion": "1.0.0.0-1.1.0.0",
                        "newVersion": "1.1.0.0"
                      },
                      "children": []
                    },
                    "\r\n      "
                  ]
                },
                "\r\n      ",
                {
                  "name": "dependentAssembly",
                  "attrs": {},
                  "children": [
                    "\r\n        ",
                    {
                      "name": "assemblyIdentity",
                      "attrs": {
                        "name": "WebGrease",
                        "publicKeyToken": "31bf3856ad364e35"
                      },
                      "children": []
                    },
                    "\r\n        ",
                    {
                      "name": "bindingRedirect",
                      "attrs": {
                        "oldVersion": "0.0.0.0-1.5.2.14234",
                        "newVersion": "1.5.2.14234"
                      },
                      "children": []
                    },
                    "\r\n      "
                  ]
                },
                "\r\n      ",
                {
                  "name": "dependentAssembly",
                  "attrs": {},
                  "children": [
                    "\r\n        ",
                    {
                      "name": "assemblyIdentity",
                      "attrs": {
                        "name": "System.Web.Helpers",
                        "publicKeyToken": "31bf3856ad364e35"
                      },
                      "children": []
                    },
                    "\r\n        ",
                    {
                      "name": "bindingRedirect",
                      "attrs": {
                        "oldVersion": "1.0.0.0-3.0.0.0",
                        "newVersion": "3.0.0.0"
                      },
                      "children": []
                    },
                    "\r\n      "
                  ]
                },
                "\r\n      ",
                {
                  "name": "dependentAssembly",
                  "attrs": {},
                  "children": [
                    "\r\n        ",
                    {
                      "name": "assemblyIdentity",
                      "attrs": {
                        "name": "System.Web.Mvc",
                        "publicKeyToken": "31bf3856ad364e35"
                      },
                      "children": []
                    },
                    "\r\n        ",
                    {
                      "name": "bindingRedirect",
                      "attrs": {
                        "oldVersion": "1.0.0.0-5.2.3.0",
                        "newVersion": "5.2.3.0"
                      },
                      "children": []
                    },
                    "\r\n      "
                  ]
                },
                "\r\n      ",
                {
                  "name": "dependentAssembly",
                  "attrs": {},
                  "children": [
                    "\r\n        ",
                    {
                      "name": "assemblyIdentity",
                      "attrs": {
                        "name": "System.Web.WebPages",
                        "publicKeyToken": "31bf3856ad364e35"
                      },
                      "children": []
                    },
                    "\r\n        ",
                    {
                      "name": "bindingRedirect",
                      "attrs": {
                        "oldVersion": "1.0.0.0-3.0.0.0",
                        "newVersion": "3.0.0.0"
                      },
                      "children": []
                    },
                    "\r\n      "
                  ]
                },
                "\r\n    "
              ]
            },
            "\r\n  "
          ]
        },
        "\r\n  ",
        {
          "name": "entityFramework",
          "attrs": {},
          "children": [
            "\r\n    ",
            {
              "name": "defaultConnectionFactory",
              "attrs": {
                "type": "System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"
              },
              "children": [
                "\r\n      ",
                {
                  "name": "parameters",
                  "attrs": {},
                  "children": [
                    "\r\n        ",
                    {
                      "name": "parameter",
                      "attrs": {
                        "value": "mssqllocaldb",
                        "rmtype": "rmapptype"
                      },
                      "children": []
                    },
                    "\r\n      "
                  ]
                },
                "\r\n    "
              ]
            },
            "\r\n    ",
            {
              "name": "providers",
              "attrs": {},
              "children": [
                "\r\n      ",
                {
                  "name": "provider",
                  "attrs": {
                    "invariantName": "System.Data.SqlClient",
                    "type": "System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"
                  },
                  "children": []
                },
                "\r\n    "
              ]
            },
            "\r\n  "
          ]
        },
        "\r\n  ",
        {
          "name": "system.codedom",
          "attrs": {},
          "children": [
            "\r\n    ",
            {
              "name": "compilers",
              "attrs": {},
              "children": [
                "\r\n      ",
                {
                  "name": "compiler",
                  "attrs": {
                    "language": "c#;cs;csharp",
                    "extension": ".cs",
                    "type": "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
                    "warningLevel": "4",
                    "compilerOptions": "/langversion:6 /nowarn:1659;1699;1701"
                  },
                  "children": []
                },
                "\r\n      ",
                {
                  "name": "compiler",
                  "attrs": {
                    "language": "vb;vbs;visualbasic;vbscript",
                    "extension": ".vb",
                    "type": "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
                    "warningLevel": "4",
                    "compilerOptions": "/langversion:14 /nowarn:41008 /define:_MYTYPE=\\\"Web\\\" /optionInfer+"
                  },
                  "children": []
                },
                "\r\n    "
              ]
            },
            "\r\n  "
          ]
        },
        "\r\n"
      ]
    }
  ],
  "configsections": [
    {
      "name": "configSections",
      "attrs": {},
      "children": [
        "\r\n    ",
        {
          "name": "section",
          "attrs": {
            "name": "entityFramework",
            "type": "System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
            "requirePermission": "false"
          },
          "children": []
        },
        "\r\n  "
      ]
    }
  ],
  "section": [
    {
      "name": "section",
      "attrs": {
        "name": "entityFramework",
        "type": "System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
        "requirePermission": "false"
      },
      "children": []
    }
  ],
  "connectionstrings": [
    {
      "name": "connectionStrings",
      "attrs": {},
      "children": [
        "\r\n    ",
        {
          "name": "add",
          "attrs": {
            "name": "DefaultConnection",
            "conntype": "conntype",
            "connectionString": "Data Source=(LocalDb)\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\aspnet-AzureWebApp1-20160810012740.mdf;Initial Catalog=aspnet-AzureWebApp1-20160810012740;Integrated Security=True",
            "providerName": "System.Data.SqlClient"
          },
          "children": []
        },
        "\r\n    ",
        {
          "name": "add",
          "attrs": {
            "name": "OtherDefaultConnection",
            "conntype": "conntype",
            "connectionString": "Data Source=(LocalDb)\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\aspnet-AzureWebApp1-20160810012740.mdf;Initial Catalog=aspnet-AzureWebApp1-20160810012740;Integrated Security=True",
            "providerName": "System.Data.SqlClient"
          },
          "children": []
        },
        "\r\n    ",
        {
          "name": "add",
          "attrs": {
            "name": "InvalidName",
            "conntype": "conntype",
            "providerName": "System.Data.SqlClient"
          },
          "children": []
        },
        "\r\n    ",
        {
          "name": "add",
          "attrs": {
            "name": "ParameterConnection",
            "conntype": "conntype",
            "connectionString": "$(ReplacableToken_DefaultConnection-Web.config Connection String_0)"
          },
          "children": []
        },
        "\r\n    ",
        {
          "name": "add",
          "attrs": {
            "name": "NoConnectionName",
            "conntype": "conntype",
            "connectionString": "NoConnectionName"
          },
          "children": []
        },
        "\r\n  "
      ]
    }
  ],
  "add": [
    {
      "name": "add",
      "attrs": {
        "name": "DefaultConnection",
        "conntype": "conntype",
        "connectionString": "Data Source=(LocalDb)\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\aspnet-AzureWebApp1-20160810012740.mdf;Initial Catalog=aspnet-AzureWebApp1-20160810012740;Integrated Security=True",
        "providerName": "System.Data.SqlClient"
      },
      "children": []
    },
    {
      "name": "add",
      "attrs": {
        "name": "OtherDefaultConnection",
        "conntype": "conntype",
        "connectionString": "Data Source=(LocalDb)\\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\\aspnet-AzureWebApp1-20160810012740.mdf;Initial Catalog=aspnet-AzureWebApp1-20160810012740;Integrated Security=True",
        "providerName": "System.Data.SqlClient"
      },
      "children": []
    },
    {
      "name": "add",
      "attrs": {
        "name": "InvalidName",
        "conntype": "conntype",
        "providerName": "System.Data.SqlClient"
      },
      "children": []
    },
    {
      "name": "add",
      "attrs": {
        "name": "ParameterConnection",
        "conntype": "conntype",
        "connectionString": "$(ReplacableToken_DefaultConnection-Web.config Connection String_0)"
      },
      "children": []
    },
    {
      "name": "add",
      "attrs": {
        "name": "NoConnectionName",
        "conntype": "conntype",
        "connectionString": "NoConnectionName"
      },
      "children": []
    },
    {
      "name": "add",
      "attrs": {
        "key": "webpages:Version",
        "value": "CONFIG_FILE_SETTINGS_TOKEN(webpages:Version)"
      },
      "children": []
    },
    {
      "name": "add",
      "attrs": {
        "key": "webpages:Enabled",
        "value": "false"
      },
      "children": []
    },
    {
      "name": "add",
      "attrs": {
        "key": "ClientValidationEnabled",
        "value": "true"
      },
      "children": []
    },
    {
      "name": "add",
      "attrs": {
        "key": "UnobtrusiveJavaScriptEnabled",
        "value": "true"
      },
      "children": []
    },
    {
      "name": "add",
      "attrs": {
        "key": "rmappname",
        "value": "true"
      },
      "children": []
    },
    {
      "name": "add",
      "attrs": {
        "name": "ApplicationInsightsWebTracking",
        "type": "Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"
      },
      "children": []
    },
    {
      "name": "add",
      "attrs": {
        "name": "ApplicationInsightsWebTracking",
        "type": "Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web",
        "preCondition": "managedHandler"
      },
      "children": []
    }
  ],
  "appsettings": [
    {
      "name": "appSettings",
      "attrs": {},
      "children": [
        "\r\n    ",
        {
          "name": "add",
          "attrs": {
            "key": "webpages:Version",
            "value": "CONFIG_FILE_SETTINGS_TOKEN(webpages:Version)"
          },
          "children": []
        },
        "\r\n    ",
        {
          "name": "add",
          "attrs": {
            "key": "webpages:Enabled",
            "value": "false"
          },
          "children": []
        },
        "\r\n    ",
        {
          "name": "add",
          "attrs": {
            "key": "ClientValidationEnabled",
            "value": "true"
          },
          "children": []
        },
        "\r\n    ",
        {
          "name": "add",
          "attrs": {
            "key": "UnobtrusiveJavaScriptEnabled",
            "value": "true"
          },
          "children": []
        },
        "\r\n  ",
        {
          "name": "add",
          "attrs": {
            "key": "rmappname",
            "value": "true"
          },
          "children": []
        },
        "\r\n  "
      ]
    }
  ],
  "system.web": [
    {
      "name": "system.web",
      "attrs": {},
      "children": [
        "\r\n    ",
        {
          "name": "authentication",
          "attrs": {
            "mode": "None"
          },
          "children": []
        },
        "\r\n    ",
        {
          "name": "compilation",
          "attrs": {
            "debug": "true",
            "targetFramework": "4.5.2"
          },
          "children": []
        },
        "\r\n    ",
        {
          "name": "httpRuntime",
          "attrs": {
            "targetFramework": "4.5.2"
          },
          "children": []
        },
        "\r\n    ",
        {
          "name": "httpModules",
          "attrs": {},
          "children": [
            "\r\n      ",
            {
              "name": "add",
              "attrs": {
                "name": "ApplicationInsightsWebTracking",
                "type": "Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"
              },
              "children": []
            },
            "\r\n    "
          ]
        },
        "\r\n  "
      ]
    }
  ],
  "authentication": [
    {
      "name": "authentication",
      "attrs": {
        "mode": "None"
      },
      "children": []
    }
  ],
  "compilation": [
    {
      "name": "compilation",
      "attrs": {
        "debug": "true",
        "targetFramework": "4.5.2"
      },
      "children": []
    }
  ],
  "httpruntime": [
    {
      "name": "httpRuntime",
      "attrs": {
        "targetFramework": "4.5.2"
      },
      "children": []
    }
  ],
  "httpmodules": [
    {
      "name": "httpModules",
      "attrs": {},
      "children": [
        "\r\n      ",
        {
          "name": "add",
          "attrs": {
            "name": "ApplicationInsightsWebTracking",
            "type": "Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"
          },
          "children": []
        },
        "\r\n    "
      ]
    }
  ],
  "system.webserver": [
    {
      "name": "system.webServer",
      "attrs": {},
      "children": [
        "\r\n    ",
        {
          "name": "modules",
          "attrs": {},
          "children": [
            "\r\n      ",
            {
              "name": "remove",
              "attrs": {
                "name": "FormsAuthentication"
              },
              "children": []
            },
            "\r\n      ",
            {
              "name": "remove",
              "attrs": {
                "name": "ApplicationInsightsWebTracking"
              },
              "children": []
            },
            "\r\n      ",
            {
              "name": "add",
              "attrs": {
                "name": "ApplicationInsightsWebTracking",
                "type": "Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web",
                "preCondition": "managedHandler"
              },
              "children": []
            },
            "\r\n    "
          ]
        },
        "\r\n    ",
        {
          "name": "validation",
          "attrs": {
            "validateIntegratedModeConfiguration": "false"
          },
          "children": []
        },
        "\r\n  "
      ]
    }
  ],
  "modules": [
    {
      "name": "modules",
      "attrs": {},
      "children": [
        "\r\n      ",
        {
          "name": "remove",
          "attrs": {
            "name": "FormsAuthentication"
          },
          "children": []
        },
        "\r\n      ",
        {
          "name": "remove",
          "attrs": {
            "name": "ApplicationInsightsWebTracking"
          },
          "children": []
        },
        "\r\n      ",
        {
          "name": "add",
          "attrs": {
            "name": "ApplicationInsightsWebTracking",
            "type": "Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web",
            "preCondition": "managedHandler"
          },
          "children": []
        },
        "\r\n    "
      ]
    }
  ],
  "remove": [
    {
      "name": "remove",
      "attrs": {
        "name": "FormsAuthentication"
      },
      "children": []
    },
    {
      "name": "remove",
      "attrs": {
        "name": "ApplicationInsightsWebTracking"
      },
      "children": []
    }
  ],
  "validation": [
    {
      "name": "validation",
      "attrs": {
        "validateIntegratedModeConfiguration": "false"
      },
      "children": []
    }
  ],
  "runtime": [
    {
      "name": "runtime",
      "attrs": {},
      "children": [
        "\r\n    ",
        {
          "name": "assemblyBinding",
          "attrs": {
            "xmlns": "urn:schemas-microsoft-com:asm.v1"
          },
          "children": [
            "\r\n      ",
            {
              "name": "dependentAssembly",
              "attrs": {},
              "children": [
                "\r\n        ",
                {
                  "name": "assemblyIdentity",
                  "attrs": {
                    "name": "Microsoft.Owin.Security",
                    "publicKeyToken": "31bf3856ad364e35"
                  },
                  "children": []
                },
                "\r\n        ",
                {
                  "name": "bindingRedirect",
                  "attrs": {
                    "oldVersion": "0.0.0.0-3.0.1.0",
                    "newVersion": "3.0.1.0"
                  },
                  "children": []
                },
                "\r\n      "
              ]
            },
            "\r\n      ",
            {
              "name": "dependentAssembly",
              "attrs": {},
              "children": [
                "\r\n        ",
                {
                  "name": "assemblyIdentity",
                  "attrs": {
                    "name": "Microsoft.Owin.Security.OAuth",
                    "publicKeyToken": "31bf3856ad364e35"
                  },
                  "children": []
                },
                "\r\n        ",
                {
                  "name": "bindingRedirect",
                  "attrs": {
                    "oldVersion": "0.0.0.0-3.0.1.0",
                    "newVersion": "3.0.1.0"
                  },
                  "children": []
                },
                "\r\n      "
              ]
            },
            "\r\n      ",
            {
              "name": "dependentAssembly",
              "attrs": {},
              "children": [
                "\r\n        ",
                {
                  "name": "assemblyIdentity",
                  "attrs": {
                    "name": "Microsoft.Owin.Security.Cookies",
                    "publicKeyToken": "31bf3856ad364e35"
                  },
                  "children": []
                },
                "\r\n        ",
                {
                  "name": "bindingRedirect",
                  "attrs": {
                    "oldVersion": "0.0.0.0-3.0.1.0",
                    "newVersion": "3.0.1.0"
                  },
                  "children": []
                },
                "\r\n      "
              ]
            },
            "\r\n      ",
            {
              "name": "dependentAssembly",
              "attrs": {},
              "children": [
                "\r\n        ",
                {
                  "name": "assemblyIdentity",
                  "attrs": {
                    "name": "Microsoft.Owin",
                    "publicKeyToken": "31bf3856ad364e35"
                  },
                  "children": []
                },
                "\r\n        ",
                {
                  "name": "bindingRedirect",
                  "attrs": {
                    "oldVersion": "0.0.0.0-3.0.1.0",
                    "newVersion": "3.0.1.0"
                  },
                  "children": []
                },
                "\r\n      "
              ]
            },
            "\r\n      ",
            {
              "name": "dependentAssembly",
              "attrs": {},
              "children": [
                "\r\n        ",
                {
                  "name": "assemblyIdentity",
                  "attrs": {
                    "name": "Newtonsoft.Json",
                    "culture": "neutral",
                    "publicKeyToken": "30ad4fe6b2a6aeed"
                  },
                  "children": []
                },
                "\r\n        ",
                {
                  "name": "bindingRedirect",
                  "attrs": {
                    "oldVersion": "0.0.0.0-6.0.0.0",
                    "newVersion": "6.0.0.0"
                  },
                  "children": []
                },
                "\r\n      "
              ]
            },
            "\r\n      ",
            {
              "name": "dependentAssembly",
              "attrs": {},
              "children": [
                "\r\n        ",
                {
                  "name": "assemblyIdentity",
                  "attrs": {
                    "name": "System.Web.Optimization",
                    "publicKeyToken": "31bf3856ad364e35"
                  },
                  "children": []
                },
                "\r\n        ",
                {
                  "name": "bindingRedirect",
                  "attrs": {
                    "oldVersion": "1.0.0.0-1.1.0.0",
                    "newVersion": "1.1.0.0"
                  },
                  "children": []
                },
                "\r\n      "
              ]
            },
            "\r\n      ",
            {
              "name": "dependentAssembly",
              "attrs": {},
              "children": [
                "\r\n        ",
                {
                  "name": "assemblyIdentity",
                  "attrs": {
                    "name": "WebGrease",
                    "publicKeyToken": "31bf3856ad364e35"
                  },
                  "children": []
                },
                "\r\n        ",
                {
                  "name": "bindingRedirect",
                  "attrs": {
                    "oldVersion": "0.0.0.0-1.5.2.14234",
                    "newVersion": "1.5.2.14234"
                  },
                  "children": []
                },
                "\r\n      "
              ]
            },
            "\r\n      ",
            {
              "name": "dependentAssembly",
              "attrs": {},
              "children": [
                "\r\n        ",
                {
                  "name": "assemblyIdentity",
                  "attrs": {
                    "name": "System.Web.Helpers",
                    "publicKeyToken": "31bf3856ad364e35"
                  },
                  "children": []
                },
                "\r\n        ",
                {
                  "name": "bindingRedirect",
                  "attrs": {
                    "oldVersion": "1.0.0.0-3.0.0.0",
                    "newVersion": "3.0.0.0"
                  },
                  "children": []
                },
                "\r\n      "
              ]
            },
            "\r\n      ",
            {
              "name": "dependentAssembly",
              "attrs": {},
              "children": [
                "\r\n        ",
                {
                  "name": "assemblyIdentity",
                  "attrs": {
                    "name": "System.Web.Mvc",
                    "publicKeyToken": "31bf3856ad364e35"
                  },
                  "children": []
                },
                "\r\n        ",
                {
                  "name": "bindingRedirect",
                  "attrs": {
                    "oldVersion": "1.0.0.0-5.2.3.0",
                    "newVersion": "5.2.3.0"
                  },
                  "children": []
                },
                "\r\n      "
              ]
            },
            "\r\n      ",
            {
              "name": "dependentAssembly",
              "attrs": {},
              "children": [
                "\r\n        ",
                {
                  "name": "assemblyIdentity",
                  "attrs": {
                    "name": "System.Web.WebPages",
                    "publicKeyToken": "31bf3856ad364e35"
                  },
                  "children": []
                },
                "\r\n        ",
                {
                  "name": "bindingRedirect",
                  "attrs": {
                    "oldVersion": "1.0.0.0-3.0.0.0",
                    "newVersion": "3.0.0.0"
                  },
                  "children": []
                },
                "\r\n      "
              ]
            },
            "\r\n    "
          ]
        },
        "\r\n  "
      ]
    }
  ],
  "assemblybinding": [
    {
      "name": "assemblyBinding",
      "attrs": {
        "xmlns": "urn:schemas-microsoft-com:asm.v1"
      },
      "children": [
        "\r\n      ",
        {
          "name": "dependentAssembly",
          "attrs": {},
          "children": [
            "\r\n        ",
            {
              "name": "assemblyIdentity",
              "attrs": {
                "name": "Microsoft.Owin.Security",
                "publicKeyToken": "31bf3856ad364e35"
              },
              "children": []
            },
            "\r\n        ",
            {
              "name": "bindingRedirect",
              "attrs": {
                "oldVersion": "0.0.0.0-3.0.1.0",
                "newVersion": "3.0.1.0"
              },
              "children": []
            },
            "\r\n      "
          ]
        },
        "\r\n      ",
        {
          "name": "dependentAssembly",
          "attrs": {},
          "children": [
            "\r\n        ",
            {
              "name": "assemblyIdentity",
              "attrs": {
                "name": "Microsoft.Owin.Security.OAuth",
                "publicKeyToken": "31bf3856ad364e35"
              },
              "children": []
            },
            "\r\n        ",
            {
              "name": "bindingRedirect",
              "attrs": {
                "oldVersion": "0.0.0.0-3.0.1.0",
                "newVersion": "3.0.1.0"
              },
              "children": []
            },
            "\r\n      "
          ]
        },
        "\r\n      ",
        {
          "name": "dependentAssembly",
          "attrs": {},
          "children": [
            "\r\n        ",
            {
              "name": "assemblyIdentity",
              "attrs": {
                "name": "Microsoft.Owin.Security.Cookies",
                "publicKeyToken": "31bf3856ad364e35"
              },
              "children": []
            },
            "\r\n        ",
            {
              "name": "bindingRedirect",
              "attrs": {
                "oldVersion": "0.0.0.0-3.0.1.0",
                "newVersion": "3.0.1.0"
              },
              "children": []
            },
            "\r\n      "
          ]
        },
        "\r\n      ",
        {
          "name": "dependentAssembly",
          "attrs": {},
          "children": [
            "\r\n        ",
            {
              "name": "assemblyIdentity",
              "attrs": {
                "name": "Microsoft.Owin",
                "publicKeyToken": "31bf3856ad364e35"
              },
              "children": []
            },
            "\r\n        ",
            {
              "name": "bindingRedirect",
              "attrs": {
                "oldVersion": "0.0.0.0-3.0.1.0",
                "newVersion": "3.0.1.0"
              },
              "children": []
            },
            "\r\n      "
          ]
        },
        "\r\n      ",
        {
          "name": "dependentAssembly",
          "attrs": {},
          "children": [
            "\r\n        ",
            {
              "name": "assemblyIdentity",
              "attrs": {
                "name": "Newtonsoft.Json",
                "culture": "neutral",
                "publicKeyToken": "30ad4fe6b2a6aeed"
              },
              "children": []
            },
            "\r\n        ",
            {
              "name": "bindingRedirect",
              "attrs": {
                "oldVersion": "0.0.0.0-6.0.0.0",
                "newVersion": "6.0.0.0"
              },
              "children": []
            },
            "\r\n      "
          ]
        },
        "\r\n      ",
        {
          "name": "dependentAssembly",
          "attrs": {},
          "children": [
            "\r\n        ",
            {
              "name": "assemblyIdentity",
              "attrs": {
                "name": "System.Web.Optimization",
                "publicKeyToken": "31bf3856ad364e35"
              },
              "children": []
            },
            "\r\n        ",
            {
              "name": "bindingRedirect",
              "attrs": {
                "oldVersion": "1.0.0.0-1.1.0.0",
                "newVersion": "1.1.0.0"
              },
              "children": []
            },
            "\r\n      "
          ]
        },
        "\r\n      ",
        {
          "name": "dependentAssembly",
          "attrs": {},
          "children": [
            "\r\n        ",
            {
              "name": "assemblyIdentity",
              "attrs": {
                "name": "WebGrease",
                "publicKeyToken": "31bf3856ad364e35"
              },
              "children": []
            },
            "\r\n        ",
            {
              "name": "bindingRedirect",
              "attrs": {
                "oldVersion": "0.0.0.0-1.5.2.14234",
                "newVersion": "1.5.2.14234"
              },
              "children": []
            },
            "\r\n      "
          ]
        },
        "\r\n      ",
        {
          "name": "dependentAssembly",
          "attrs": {},
          "children": [
            "\r\n        ",
            {
              "name": "assemblyIdentity",
              "attrs": {
                "name": "System.Web.Helpers",
                "publicKeyToken": "31bf3856ad364e35"
              },
              "children": []
            },
            "\r\n        ",
            {
              "name": "bindingRedirect",
              "attrs": {
                "oldVersion": "1.0.0.0-3.0.0.0",
                "newVersion": "3.0.0.0"
              },
              "children": []
            },
            "\r\n      "
          ]
        },
        "\r\n      ",
        {
          "name": "dependentAssembly",
          "attrs": {},
          "children": [
            "\r\n        ",
            {
              "name": "assemblyIdentity",
              "attrs": {
                "name": "System.Web.Mvc",
                "publicKeyToken": "31bf3856ad364e35"
              },
              "children": []
            },
            "\r\n        ",
            {
              "name": "bindingRedirect",
              "attrs": {
                "oldVersion": "1.0.0.0-5.2.3.0",
                "newVersion": "5.2.3.0"
              },
              "children": []
            },
            "\r\n      "
          ]
        },
        "\r\n      ",
        {
          "name": "dependentAssembly",
          "attrs": {},
          "children": [
            "\r\n        ",
            {
              "name": "assemblyIdentity",
              "attrs": {
                "name": "System.Web.WebPages",
                "publicKeyToken": "31bf3856ad364e35"
              },
              "children": []
            },
            "\r\n        ",
            {
              "name": "bindingRedirect",
              "attrs": {
                "oldVersion": "1.0.0.0-3.0.0.0",
                "newVersion": "3.0.0.0"
              },
              "children": []
            },
            "\r\n      "
          ]
        },
        "\r\n    "
      ]
    }
  ],
  "dependentassembly": [
    {
      "name": "dependentAssembly",
      "attrs": {},
      "children": [
        "\r\n        ",
        {
          "name": "assemblyIdentity",
          "attrs": {
            "name": "Microsoft.Owin.Security",
            "publicKeyToken": "31bf3856ad364e35"
          },
          "children": []
        },
        "\r\n        ",
        {
          "name": "bindingRedirect",
          "attrs": {
            "oldVersion": "0.0.0.0-3.0.1.0",
            "newVersion": "3.0.1.0"
          },
          "children": []
        },
        "\r\n      "
      ]
    },
    {
      "name": "dependentAssembly",
      "attrs": {},
      "children": [
        "\r\n        ",
        {
          "name": "assemblyIdentity",
          "attrs": {
            "name": "Microsoft.Owin.Security.OAuth",
            "publicKeyToken": "31bf3856ad364e35"
          },
          "children": []
        },
        "\r\n        ",
        {
          "name": "bindingRedirect",
          "attrs": {
            "oldVersion": "0.0.0.0-3.0.1.0",
            "newVersion": "3.0.1.0"
          },
          "children": []
        },
        "\r\n      "
      ]
    },
    {
      "name": "dependentAssembly",
      "attrs": {},
      "children": [
        "\r\n        ",
        {
          "name": "assemblyIdentity",
          "attrs": {
            "name": "Microsoft.Owin.Security.Cookies",
            "publicKeyToken": "31bf3856ad364e35"
          },
          "children": []
        },
        "\r\n        ",
        {
          "name": "bindingRedirect",
          "attrs": {
            "oldVersion": "0.0.0.0-3.0.1.0",
            "newVersion": "3.0.1.0"
          },
          "children": []
        },
        "\r\n      "
      ]
    },
    {
      "name": "dependentAssembly",
      "attrs": {},
      "children": [
        "\r\n        ",
        {
          "name": "assemblyIdentity",
          "attrs": {
            "name": "Microsoft.Owin",
            "publicKeyToken": "31bf3856ad364e35"
          },
          "children": []
        },
        "\r\n        ",
        {
          "name": "bindingRedirect",
          "attrs": {
            "oldVersion": "0.0.0.0-3.0.1.0",
            "newVersion": "3.0.1.0"
          },
          "children": []
        },
        "\r\n      "
      ]
    },
    {
      "name": "dependentAssembly",
      "attrs": {},
      "children": [
        "\r\n        ",
        {
          "name": "assemblyIdentity",
          "attrs": {
            "name": "Newtonsoft.Json",
            "culture": "neutral",
            "publicKeyToken": "30ad4fe6b2a6aeed"
          },
          "children": []
        },
        "\r\n        ",
        {
          "name": "bindingRedirect",
          "attrs": {
            "oldVersion": "0.0.0.0-6.0.0.0",
            "newVersion": "6.0.0.0"
          },
          "children": []
        },
        "\r\n      "
      ]
    },
    {
      "name": "dependentAssembly",
      "attrs": {},
      "children": [
        "\r\n        ",
        {
          "name": "assemblyIdentity",
          "attrs": {
            "name": "System.Web.Optimization",
            "publicKeyToken": "31bf3856ad364e35"
          },
          "children": []
        },
        "\r\n        ",
        {
          "name": "bindingRedirect",
          "attrs": {
            "oldVersion": "1.0.0.0-1.1.0.0",
            "newVersion": "1.1.0.0"
          },
          "children": []
        },
        "\r\n      "
      ]
    },
    {
      "name": "dependentAssembly",
      "attrs": {},
      "children": [
        "\r\n        ",
        {
          "name": "assemblyIdentity",
          "attrs": {
            "name": "WebGrease",
            "publicKeyToken": "31bf3856ad364e35"
          },
          "children": []
        },
        "\r\n        ",
        {
          "name": "bindingRedirect",
          "attrs": {
            "oldVersion": "0.0.0.0-1.5.2.14234",
            "newVersion": "1.5.2.14234"
          },
          "children": []
        },
        "\r\n      "
      ]
    },
    {
      "name": "dependentAssembly",
      "attrs": {},
      "children": [
        "\r\n        ",
        {
          "name": "assemblyIdentity",
          "attrs": {
            "name": "System.Web.Helpers",
            "publicKeyToken": "31bf3856ad364e35"
          },
          "children": []
        },
        "\r\n        ",
        {
          "name": "bindingRedirect",
          "attrs": {
            "oldVersion": "1.0.0.0-3.0.0.0",
            "newVersion": "3.0.0.0"
          },
          "children": []
        },
        "\r\n      "
      ]
    },
    {
      "name": "dependentAssembly",
      "attrs": {},
      "children": [
        "\r\n        ",
        {
          "name": "assemblyIdentity",
          "attrs": {
            "name": "System.Web.Mvc",
            "publicKeyToken": "31bf3856ad364e35"
          },
          "children": []
        },
        "\r\n        ",
        {
          "name": "bindingRedirect",
          "attrs": {
            "oldVersion": "1.0.0.0-5.2.3.0",
            "newVersion": "5.2.3.0"
          },
          "children": []
        },
        "\r\n      "
      ]
    },
    {
      "name": "dependentAssembly",
      "attrs": {},
      "children": [
        "\r\n        ",
        {
          "name": "assemblyIdentity",
          "attrs": {
            "name": "System.Web.WebPages",
            "publicKeyToken": "31bf3856ad364e35"
          },
          "children": []
        },
        "\r\n        ",
        {
          "name": "bindingRedirect",
          "attrs": {
            "oldVersion": "1.0.0.0-3.0.0.0",
            "newVersion": "3.0.0.0"
          },
          "children": []
        },
        "\r\n      "
      ]
    }
  ],
  "assemblyidentity": [
    {
      "name": "assemblyIdentity",
      "attrs": {
        "name": "Microsoft.Owin.Security",
        "publicKeyToken": "31bf3856ad364e35"
      },
      "children": []
    },
    {
      "name": "assemblyIdentity",
      "attrs": {
        "name": "Microsoft.Owin.Security.OAuth",
        "publicKeyToken": "31bf3856ad364e35"
      },
      "children": []
    },
    {
      "name": "assemblyIdentity",
      "attrs": {
        "name": "Microsoft.Owin.Security.Cookies",
        "publicKeyToken": "31bf3856ad364e35"
      },
      "children": []
    },
    {
      "name": "assemblyIdentity",
      "attrs": {
        "name": "Microsoft.Owin",
        "publicKeyToken": "31bf3856ad364e35"
      },
      "children": []
    },
    {
      "name": "assemblyIdentity",
      "attrs": {
        "name": "Newtonsoft.Json",
        "culture": "neutral",
        "publicKeyToken": "30ad4fe6b2a6aeed"
      },
      "children": []
    },
    {
      "name": "assemblyIdentity",
      "attrs": {
        "name": "System.Web.Optimization",
        "publicKeyToken": "31bf3856ad364e35"
      },
      "children": []
    },
    {
      "name": "assemblyIdentity",
      "attrs": {
        "name": "WebGrease",
        "publicKeyToken": "31bf3856ad364e35"
      },
      "children": []
    },
    {
      "name": "assemblyIdentity",
      "attrs": {
        "name": "System.Web.Helpers",
        "publicKeyToken": "31bf3856ad364e35"
      },
      "children": []
    },
    {
      "name": "assemblyIdentity",
      "attrs": {
        "name": "System.Web.Mvc",
        "publicKeyToken": "31bf3856ad364e35"
      },
      "children": []
    },
    {
      "name": "assemblyIdentity",
      "attrs": {
        "name": "System.Web.WebPages",
        "publicKeyToken": "31bf3856ad364e35"
      },
      "children": []
    }
  ],
  "bindingredirect": [
    {
      "name": "bindingRedirect",
      "attrs": {
        "oldVersion": "0.0.0.0-3.0.1.0",
        "newVersion": "3.0.1.0"
      },
      "children": []
    },
    {
      "name": "bindingRedirect",
      "attrs": {
        "oldVersion": "0.0.0.0-3.0.1.0",
        "newVersion": "3.0.1.0"
      },
      "children": []
    },
    {
      "name": "bindingRedirect",
      "attrs": {
        "oldVersion": "0.0.0.0-3.0.1.0",
        "newVersion": "3.0.1.0"
      },
      "children": []
    },
    {
      "name": "bindingRedirect",
      "attrs": {
        "oldVersion": "0.0.0.0-3.0.1.0",
        "newVersion": "3.0.1.0"
      },
      "children": []
    },
    {
      "name": "bindingRedirect",
      "attrs": {
        "oldVersion": "0.0.0.0-6.0.0.0",
        "newVersion": "6.0.0.0"
      },
      "children": []
    },
    {
      "name": "bindingRedirect",
      "attrs": {
        "oldVersion": "1.0.0.0-1.1.0.0",
        "newVersion": "1.1.0.0"
      },
      "children": []
    },
    {
      "name": "bindingRedirect",
      "attrs": {
        "oldVersion": "0.0.0.0-1.5.2.14234",
        "newVersion": "1.5.2.14234"
      },
      "children": []
    },
    {
      "name": "bindingRedirect",
      "attrs": {
        "oldVersion": "1.0.0.0-3.0.0.0",
        "newVersion": "3.0.0.0"
      },
      "children": []
    },
    {
      "name": "bindingRedirect",
      "attrs": {
        "oldVersion": "1.0.0.0-5.2.3.0",
        "newVersion": "5.2.3.0"
      },
      "children": []
    },
    {
      "name": "bindingRedirect",
      "attrs": {
        "oldVersion": "1.0.0.0-3.0.0.0",
        "newVersion": "3.0.0.0"
      },
      "children": []
    }
  ],
  "entityframework": [
    {
      "name": "entityFramework",
      "attrs": {},
      "children": [
        "\r\n    ",
        {
          "name": "defaultConnectionFactory",
          "attrs": {
            "type": "System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"
          },
          "children": [
            "\r\n      ",
            {
              "name": "parameters",
              "attrs": {},
              "children": [
                "\r\n        ",
                {
                  "name": "parameter",
                  "attrs": {
                    "value": "mssqllocaldb",
                    "rmtype": "rmapptype"
                  },
                  "children": []
                },
                "\r\n      "
              ]
            },
            "\r\n    "
          ]
        },
        "\r\n    ",
        {
          "name": "providers",
          "attrs": {},
          "children": [
            "\r\n      ",
            {
              "name": "provider",
              "attrs": {
                "invariantName": "System.Data.SqlClient",
                "type": "System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"
              },
              "children": []
            },
            "\r\n    "
          ]
        },
        "\r\n  "
      ]
    }
  ],
  "defaultconnectionfactory": [
    {
      "name": "defaultConnectionFactory",
      "attrs": {
        "type": "System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework"
      },
      "children": [
        "\r\n      ",
        {
          "name": "parameters",
          "attrs": {},
          "children": [
            "\r\n        ",
            {
              "name": "parameter",
              "attrs": {
                "value": "mssqllocaldb",
                "rmtype": "rmapptype"
              },
              "children": []
            },
            "\r\n      "
          ]
        },
        "\r\n    "
      ]
    }
  ],
  "parameters": [
    {
      "name": "parameters",
      "attrs": {},
      "children": [
        "\r\n        ",
        {
          "name": "parameter",
          "attrs": {
            "value": "mssqllocaldb",
            "rmtype": "rmapptype"
          },
          "children": []
        },
        "\r\n      "
      ]
    }
  ],
  "parameter": [
    {
      "name": "parameter",
      "attrs": {
        "value": "mssqllocaldb",
        "rmtype": "rmapptype"
      },
      "children": []
    }
  ],
  "providers": [
    {
      "name": "providers",
      "attrs": {},
      "children": [
        "\r\n      ",
        {
          "name": "provider",
          "attrs": {
            "invariantName": "System.Data.SqlClient",
            "type": "System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"
          },
          "children": []
        },
        "\r\n    "
      ]
    }
  ],
  "provider": [
    {
      "name": "provider",
      "attrs": {
        "invariantName": "System.Data.SqlClient",
        "type": "System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"
      },
      "children": []
    }
  ],
  "system.codedom": [
    {
      "name": "system.codedom",
      "attrs": {},
      "children": [
        "\r\n    ",
        {
          "name": "compilers",
          "attrs": {},
          "children": [
            "\r\n      ",
            {
              "name": "compiler",
              "attrs": {
                "language": "c#;cs;csharp",
                "extension": ".cs",
                "type": "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
                "warningLevel": "4",
                "compilerOptions": "/langversion:6 /nowarn:1659;1699;1701"
              },
              "children": []
            },
            "\r\n      ",
            {
              "name": "compiler",
              "attrs": {
                "language": "vb;vbs;visualbasic;vbscript",
                "extension": ".vb",
                "type": "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
                "warningLevel": "4",
                "compilerOptions": "/langversion:14 /nowarn:41008 /define:_MYTYPE=\\\"Web\\\" /optionInfer+"
              },
              "children": []
            },
            "\r\n    "
          ]
        },
        "\r\n  "
      ]
    }
  ],
  "compilers": [
    {
      "name": "compilers",
      "attrs": {},
      "children": [
        "\r\n      ",
        {
          "name": "compiler",
          "attrs": {
            "language": "c#;cs;csharp",
            "extension": ".cs",
            "type": "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
            "warningLevel": "4",
            "compilerOptions": "/langversion:6 /nowarn:1659;1699;1701"
          },
          "children": []
        },
        "\r\n      ",
        {
          "name": "compiler",
          "attrs": {
            "language": "vb;vbs;visualbasic;vbscript",
            "extension": ".vb",
            "type": "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
            "warningLevel": "4",
            "compilerOptions": "/langversion:14 /nowarn:41008 /define:_MYTYPE=\\\"Web\\\" /optionInfer+"
          },
          "children": []
        },
        "\r\n    "
      ]
    }
  ],
  "compiler": [
    {
      "name": "compiler",
      "attrs": {
        "language": "c#;cs;csharp",
        "extension": ".cs",
        "type": "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
        "warningLevel": "4",
        "compilerOptions": "/langversion:6 /nowarn:1659;1699;1701"
      },
      "children": []
    },
    {
      "name": "compiler",
      "attrs": {
        "language": "vb;vbs;visualbasic;vbscript",
        "extension": ".vb",
        "type": "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35",
        "warningLevel": "4",
        "compilerOptions": "/langversion:14 /nowarn:41008 /define:_MYTYPE=\\\"Web\\\" /optionInfer+"
      },
      "children": []
    }
  ]
}

After though when it goes to look for configSections the xmlDomLookUpTable contains the following:

{
  "parameters": [
    {
      "name": "parameters",
      "attrs": {},
      "children": [
        "\r\n  ",
        {
          "name": "parameter",
          "attrs": {
            "name": "IIS Web Application Name",
            "defaultValue": "Default Web Site/WebApplication3_deploy",
            "tags": "IisApp"
          },
          "children": [
            "\r\n  "
          ]
        },
        "\r\n  ",
        {
          "name": "parameter",
          "attrs": {
            "name": "DefaultConnection-Web.config Connection String",
            "defaultValue": "PARAM_FILE_REPLACE_TOKEN(DefaultConnection-Web.config Connection String)"
          },
          "children": [
            "\r\n    ",
            {
              "name": "parameterEntry",
              "attrs": {
                "kind": "XmlFile",
                "scope": "c:\\\\users\\\\vinca\\.fareast\\\\documents\\\\visual\\ studio\\ 2015\\\\Projects\\\\WebApplication3\\\\obj\\\\Release\\\\Package\\\\PackageTmp\\\\Web\\.config$",
                "match": "/configuration/connectionStrings/add[@name='DefaultConnection']/@connectionString"
              },
              "children": []
            },
            "\r\n  "
          ]
        },
        "\r\n"
      ]
    }
  ],
  "parameter": [
    {
      "name": "parameter",
      "attrs": {
        "name": "IIS Web Application Name",
        "defaultValue": "Default Web Site/WebApplication3_deploy",
        "tags": "IisApp"
      },
      "children": [
        "\r\n  "
      ]
    },
    {
      "name": "parameter",
      "attrs": {
        "name": "DefaultConnection-Web.config Connection String",
        "defaultValue": "PARAM_FILE_REPLACE_TOKEN(DefaultConnection-Web.config Connection String)"
      },
      "children": [
        "\r\n    ",
        {
          "name": "parameterEntry",
          "attrs": {
            "kind": "XmlFile",
            "scope": "c:\\\\users\\\\vinca\\.fareast\\\\documents\\\\visual\\ studio\\ 2015\\\\Projects\\\\WebApplication3\\\\obj\\\\Release\\\\Package\\\\PackageTmp\\\\Web\\.config$",
            "match": "/configuration/connectionStrings/add[@name='DefaultConnection']/@connectionString"
          },
          "children": []
        },
        "\r\n  "
      ]
    }
  ],
  "parameterentry": [
    {
      "name": "parameterEntry",
      "attrs": {
        "kind": "XmlFile",
        "scope": "c:\\\\users\\\\vinca\\.fareast\\\\documents\\\\visual\\ studio\\ 2015\\\\Projects\\\\WebApplication3\\\\obj\\\\Release\\\\Package\\\\PackageTmp\\\\Web\\.config$",
        "match": "/configuration/connectionStrings/add[@name='DefaultConnection']/@connectionString"
      },
      "children": []
    }
  ]
}
Ajay-MS commented 6 years ago

@shaneholder

Two different JSONs that you have shared corresponding to xmlDom being created by ltxdomutility.ts are actually for two different purposes.

Your first JSON is corresponding to xml variable substitution for your web.config file. Code reference - Initialize XmlDom for Config File

Second JSON is corresponding to xml variable substitution in your parameters.xml file present in your package. Code reference - Initialize XmlDom for parameters file

I have verified that config section variable substitution in working fine.

You might be facing issue probably due to some other reason. We can debug into that issue.

Can you please share your email id so that we can arrange a call to look into this issue.

shaneholder commented 6 years ago

@Ajay-MS how are you verifying the config sections are being replaced correctly? I pulled down master this weekend and ran the L0 tests in AzureRmWebAppDeployment which run the L1XdtTransform tests and those tests do not have any checks for transformations of the configSections. Perhaps I am looking at the wrong tests?

Ajay-MS commented 6 years ago

I have executed task and provided a package with web.config and web.config contains a config section. After execution I have figured out all values that I have specified corresponding to config section are getting replaced properly.

Another point, in your recent comment you have mentioned that you are running test corresponding to XDT traspformation.

Please try L0 corresponding to XML variable substitution. https://github.com/Microsoft/vsts-tasks/blob/master/Tasks/Common/webdeployment-common/Tests/L1XmlVarSub.ts

Though this file currently don't have any variable from config section. For your testing you can add one variable for config section too.

shaneholder commented 6 years ago

I referenced the wrong tests in my most recent post, I am working with the L1XmlVarSub tests. I will run the tests again and post more detailed results.

rajatagrawal-dev commented 6 years ago

This has been fixed in #5912. It will be available with the next deployment which will take around 2 weeks to get to all accounts. Issue #5595 will be tracked separately, hence closing this.