Error “Keyword not supported: ‘data source’.” using Octopus Deploy

We recently started using Octopus Deploy for our deployments. After the last deployment I got this strange error:

System.ArgumentException: Keyword not supported: 'data source'.
Stack Trace:
at System.Data.EntityClient.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Hashtable synonyms)
at System.Data.EntityClient.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms)
at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString)
at System.Data.Entity.Internal.LazyInternalConnection.TryInitializeFromAppConfig(String name, AppConfig config)
at System.Data.Entity.Internal.LazyInternalConnection.Initialize()

The exception stack trace indicated that it had something to do with Entity Framework. I assumed the connection string could have been misconfigured on the server. We use the Configuration variables feature of Octopus Deploy to replace some connection strings in the web.config file.

The value for the connection string looked alright:


The connection string was for Entity Framework and had this value that contains another connection string inside quotes.

Then I had a look at the actual web.config file on the server. This showed something interesting in the connectionStrings section:

<add name="DataModelContainer" connectionString="metadata=[...] connection string="data source=[....]"" providerName="System.Data.EntityClient"/>

Apparently the ‘"’ was encoded twice to ‘"’. This was done when Octopus Deploy replaced the connection string value.

The solution was to not use the XML encoded value in Octopus deploy. So the ‘"’ had to be replaced with ‘”‘.

1 Comment Error “Keyword not supported: ‘data source’.” using Octopus Deploy

  1. Randy

    I think you misspelled the word “choosen” on your website. If you want to keep errors off of your site we’ve successfully used a tool like in the past for our websites. A nice customer pointed out our mistakes so I’m just paying it forward :).


Leave a Reply

Your email address will not be published. Required fields are marked *