title: Web Config Transformation Syntax
body: <p>I've been following the MSDN guide for <a href="http://msdn.microsoft.com/en-us/library/dd465326.aspx">Web Config Transformation</a> and by-and-large have had success with it.</p>
  
  <p>However, one line of my web config is giving my troubles and I can only assume it's because I'm misunderstanding the guide and using the wrong syntax.</p>
  
  <p>I'm hopeful that someone will be able to point out my mistake, and will be grateful if that's the case.</p>
  
  <p>The offending line in the transform is:</p>
  
  <pre><code>&lt;sessionState sqlConnectionString="data source=localhost;uid=userId;pwd=password;" xdt:Transform="SetAttributes(sqlConnectionString)" /&gt;
  </code></pre>
  
  <p>The line in the original web config is:</p>
  
  <pre><code>&lt;sessionState mode="SQLServer" sqlConnectionString="data source=networkAlias;uid=userId;pwd=password;" cookieless="UseDeviceProfile" timeout="120" /&gt;
  </code></pre>
  
  <p>My hope was that the transform would replace the attribute "sqlConnectionString", changing the connection details. Unfortunately the line is unaffected.</p>
  
  <p>I've used exactly the same syntax for:</p>
  
  <pre><code>&lt;network host="localhost" xdt:Transform="SetAttributes(host)" /&gt;
  </code></pre>
  
  <p>The above works just fine, so I had assumed it would be the case for the  too.</p>
  
  <p>Can anyone see where I'm going wrong?</p>