Skip to content

Normally, Neuron ESB environment variables are created and set in the ESB solution.  To manage them, navigate to the Deployment tab and click the Environment Variables node.  Occasionally you may want to create and/or set an environment variable from within the Neuron ESB service’s configuration file (esbservice.exe.config).  To do that…

First, you need to register the EnvironmentConfigurationSection.  The <configSections> element is already there, so you just need to add the <section> element:

<configSections>

  <section name="neuron.pipelines" type="Neuron.Configuration.PipelinesConfigurationSection, Neuron"/>

  <section name="neuron.environment" type="Neuron.Configuration.EnvironmentConfigurationSection, Neuron"/>

</configSections>

Second, you define the environment variables.  This section is not there by default, so you’ll have to add the whole thing.  For example, to add the environment variable NeuronDB:

<neuron.environment>

  <variables>

    <add name="NeuronDB" value="Data Source=.;Initial Catalog=NeuronDB;Integrated Security=True" />

  </variables>

</neuron.environment>

You can add any number of environment variables in the config file.

Notes!  When you set environment variables in the ESB Service config file, they do not have to be defined in the solution.  You can either add new environment variables or set the values of existing variables in the config file.  Environment variable that have been defined in both the ESB solution and the config file will inherit the value set in the config file.