 <p>I've run into the exact same issue (with a different password of course).</p> <p>To keep the connection string to the database working on the developer machines i've modified the publish settings to use a 'different' connections string. </p> <p>For your example: web.config would contain:</p> <pre><code>&lt;connectionStrings&gt; &lt;add name="MyDB" connectionString="server=Server1;uid=user1;pwd=abc123%72;database=Database1;" &lt;/connectionStrings&gt; </code></pre> <p>Under the publish settings right-click project, select publish..., go to settings->databases. For the database MyDB, enter</p> <pre><code> server=Server1;uid=user1;pwd=abc123%72;database=Database1; </code></pre> <p>This allowed my developer machine to retain it's connection to the database and the host machine to automatically use the correct connection string both by publishing directly or through teamcity.</p>