Asp.net – Insert an element in web.config based on key value in appsettings
We have a requirement to apply a transform based upon an app setting value in web.config for our ASP.NET MVC project. <!--web.config--> <?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="environment:define" value="dev"/> </appSettings> <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="https://abcd.com" /> </customHeaders> </httpProtocol>…