• Print
  • Share
  • Dark

Configuring for Azure Web & Worker Roles

  • Updated on 24 Jun 2018
  • 1 minute to read
  • Contributors

If you are wanting to log directly via the Stackify API and want to control App Settings configuration from the Service Definition file, follow the steps below:

The Service Definition File

You will need to define the following properties in the ConfigurationSettings section of the Service Definition file as shown above:

	<Setting name="Stackify.ApiKey"/>
	<Setting name="Stackify.AppName"/>
	<Setting name="Stackify.Environment"/> 

The Local and Cloud Service Configuration Files

In the ServiceConfiguration.Local.cscfg and ServiceConfiguration.Cloud.cscfg files you will give values to the three Setting names you created in the ServiceDefinition.csdef file:

<Setting name="Stackify.ApiKey" value="YOUR_APIKEY"/>
<Setting name="Stackify.AppName" value="YOUR_APP_NAME"/> 
<Setting name="Stackify.Environment" value="YOUR_ENVIRONMENT"/>


By making the Environment names of the Local file and Cloud file different you will see these different environments in Stackify.  For example, you can name the Environment name of the ServiceConfiguration.Local file "Dev" and the name of the ServiceConfiguration.Cloud file "Prod" to differentiate the two deployments.