Assembly: Microsoft.WindowsAzure.ServiceRuntime (in Microsoft.WindowsAzure.ServiceRuntime.dll)
'Declaration <SecurityPermissionAttribute(SecurityAction.Assert, UnmanagedCode:=True)> _ Public Shared Function GetConfigurationSettingValue ( _ configurationSettingName As String _ ) As String
The name of the configuration setting.
Return ValueType: System.StringA String that contains the value of the configuration setting.
The configuration setting that was being retrieved does not exist.
Configuration settings for a role are defined in the ServiceDefinition.csdef file and the values for the settings are configured in the ServiceConfiguration.cscfg file. For more information about defining and configuring settings, see the following information:
The GetConfigurationSettingValue method can be used to retrieve the value that is defined in the ServiceConfiguration.cscfg file. The following code example shows how to get and write out the value for a setting called MySetting:
var settingValue = RoleEnvironment.GetConfigurationSettingValue("MySetting"); Trace.WriteLine("The setting value is: " + settingValue, "Information");
Development PlatformsWindows Vista, Windows 7 and Windows Server 2008