title: Web.Config Debug/Release
body: <p>I know that web.config in Visual Studio 2010 provides the ability to switch from databases from Debug mode to Release mode. </p>
  
  <p><strong>Here is my Web.Release.config:</strong></p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  
  &lt;!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 --&gt;
  
  &lt;configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"&gt;
  
    &lt;connectionStrings&gt;
      &lt;add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
        providerName="System.Data.SqlClient" /&gt;
      &lt;add name="Testing1" connectionString="Data Source=test;Initial Catalog=TestDatabase;Integrated Security=True"
        providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
  
    &lt;system.web&gt;
      &lt;compilation xdt:Transform="RemoveAttributes(debug)" /&gt;
    &lt;/system.web&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p><strong>Here is my Web.Debug.config code:</strong></p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  
  &lt;!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 --&gt;
  
  &lt;configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"&gt;
  
    &lt;connectionStrings&gt;
      &lt;add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
        providerName="System.Data.SqlClient" /&gt;
      &lt;add name="Live1" connectionString="Data Source=Live;Initial Catalog=LiveDatabase;Integrated Security=True"
        providerName="System.Data.SqlClient" /&gt;
    &lt;/connectionStrings&gt;
  
    &lt;system.web&gt;
      &lt;compilation xdt:Transform="RemoveAttributes(debug)" /&gt;
    &lt;/system.web&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p><strong>And this is my Web.config code:</strong></p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  
  &lt;!-- For more information on how to configure your ASP.NET application, please visit http://go.microsoft.com/fwlink/?LinkId=169433 --&gt;
  &lt;configuration&gt;
  
    &lt;system.web&gt;
      &lt;compilation debug="true" targetFramework="4.0" /&gt;
  
      &lt;authentication mode="Forms"&gt;
         &lt;forms loginUrl="~/Account/Login.aspx" timeout="2880" /&gt;
      &lt;/authentication&gt;
  
      &lt;membership&gt;
         &lt;providers&gt;
            &lt;clear/&gt;
            &lt;add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
           enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
           maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
           applicationName="/" /&gt;
         &lt;/providers&gt;
      &lt;/membership&gt;
  
      &lt;profile&gt;
         &lt;providers&gt;
            &lt;clear/&gt;
            &lt;add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/&gt;
         &lt;/providers&gt;
      &lt;/profile&gt;
  
      &lt;roleManager enabled="false"&gt;
         &lt;providers&gt;
            &lt;clear/&gt;
            &lt;add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" /&gt;
      &lt;add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" /&gt;
         &lt;/providers&gt;
      &lt;/roleManager&gt;
  
    &lt;/system.web&gt;
  
    &lt;system.webServer&gt;
      &lt;modules runAllManagedModulesForAllRequests="true"/&gt;
    &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>When I publish my project there is nothing showing in my Web.config file.it Is not showing my Live Database connection string?</p>