For anyone that has or is going to install Sitecore’s Web Forms for Marketers module, the module comes with it’s own patch config file as you can expect. Depending on the version of Sitecore you are using, it’s either called forms.config or Sitecore.Forms.config. One of the post-install steps of the package is to configure a data provider with a database connection, e.g.
<formsDataProvider. The default configuration of this SQL-based provider is to define a connection string as the first string-based parameter below the provider, e.g.
<param desc="connection string">Database=(database);Data Source=(server);user id=(user);password=(password);Connect Timeout=30</param>
This connection string is deeply embedded within this patch config and does not follow the standard connection string configuration in the
ConnectionStrings.config file. Luckily, you can swap this out for a normal token-based connection string in
If you de-compile the data provider and look at its constructor, you can see that when no string parameter is provided, it falls back to
That base connection string property looks for a standard connection string with a token of
So the simple way to follow the standard approach to defining the database in
ConnectionStrings.config is to define a string with that
"wfm" token and ensure there is no parameter to the data provider:
<add name="wfm" connectionString="user id=username;password=password;Data Source=(server);Database=(database)" />
Leave a comment if you have any other tips like this.