I have this in my web.config
<add name="AS400" connectionString="Provider=IBMDA400;Data Source=AAAAA;User Id=aaaaaa;Password=aaaaaa;Default Collection=*SYS;" providerName="System.Data.OleDb" lockItem="true"/>
In my Web.Debug.config (The same of Webconfig)
<add name="AS400" connectionString="Provider=IBMDA400;Data Source=AAAAA;User Id=aaaaaa;Password=aaaaaa;Default Collection=*SYS;" providerName="System.Data.OleDb" lockItem="true" xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
In my Web.Release.config
<add name="AS400" connectionString="Provider=IBMDA400;Data Source=ZZZZZ;User Id=aaaaaa;Password=aaaaaa;Default Collection=*SYS;" providerName="System.Data.OleDb" lockItem="true" xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
But nothing working. If i make F5, in Release mode, i have always the connection string in web.config.
An idea?
Configuration transformation is only done when publishing. Your base configuration file should have your development settings. If you choose to use the default build configurations, normally the release transform file should contain your production environment settings and the debug transform file will contain your test environment settings.
Personally, I usually create a new build configuration for testing and for production and leave the debug and release transforms empty.
Edit: If you use the latest version of the SlowCheetah extension for Visual Studio, it will transform your configuration files during the build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With