I've been following the MSDN guide for Web Config Transformation and by-and-large have had success with it.
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.
I'm hopeful that someone will be able to point out my mistake, and will be grateful if that's the case.
The offending line in the transform is:
<sessionState sqlConnectionString="data source=localhost;uid=userId;pwd=password;" xdt:Transform="SetAttributes(sqlConnectionString)" />
The line in the original web config is:
<sessionState mode="SQLServer" sqlConnectionString="data source=networkAlias;uid=userId;pwd=password;" cookieless="UseDeviceProfile" timeout="120" />
My hope was that the transform would replace the attribute "sqlConnectionString", changing the connection details. Unfortunately the line is unaffected.
I've used exactly the same syntax for:
<network host="localhost" xdt:Transform="SetAttributes(host)" />
The above works just fine, so I had assumed it would be the case for the too.
Can anyone see where I'm going wrong?