EEE Web Service Config

From EnablerWiki
Jump to navigationJump to search

Presently the web.config file for the EEE web service contains the connection string used to connect to the EEE database and any application-specific settings. For this reason, this file is usually left unchanged after initial install.

However as the web service is serviced and updated, changes are required to the web.config file which cannot be easily deployed to an environment that already has the aforementioned environment-specific settings within.

In order to better address this issue going forward, application settings and connection string will be required to be saved to separate individual files. The web.config file will only have a reference to those files which means it can be easily updated/replaced independently during an update.

The required structure is 3 x files:

  • Web.config
  • Connections.config
  • Settings.config

Web.config

Must contain references to the new files:

<?xml version="1.0"?>
<configuration>
	…
	<appSettings file="Settings.config" />
	<connectionStrings file="Connections.config">
	…
</configuration>

Connections.config

Must contain the connection strings. Move this node here from the Web.config file.

<connectionStrings>
	<add connectionString="Data Source=.;Initial Catalog=eeeDev;Integrated Security=True;Application Name=EEE Web Service;" name="EEEConnectionString"/>
</connectionStrings>

Settings.config

Must contain the application settings. Move this node here from the Web.config file.

<appSettings>
	<add key="SQLCommandTimeout" value="110"/>
	<!-- Set to 1 to log the full result into XmlInterfaceLog. 0 to save length only. -->
	<add key="XmlInterfaceLogFullResult" value="0"/>
</appSettings>


In a future version of EEE, the updates to the EEE web service will start overwriting the web.config file with the latest version released with the update. The EEE Service Release Installer (EEEPatch) will warn users when the web.config file will be replaced, but the separate Connections.config and Settings.config files are missing.