CloudStorageAccount.FromConfigurationSetting Method

Storage Client Library NET API

[This topic is part of the Microsoft Azure Storage Client Library 1.7, which has been deprecated. See Storage Client Library for the latest version.]

Create a new instance of a CloudStorageAccount object from a specified configuration setting. This method may be called only after the SetConfigurationSettingPublisher method has been called to configure the global configuration setting publisher.

Namespace: Microsoft.WindowsAzure
Assembly: Microsoft.WindowsAzure.StorageClient (in Microsoft.WindowsAzure.StorageClient.dll)

Usage

Visual Basic
Dim settingName As String
Dim returnValue As CloudStorageAccount

returnValue = CloudStorageAccount.FromConfigurationSetting(settingName)

Syntax

Visual Basic
Public Shared Function FromConfigurationSetting ( _
	settingName As String _
) As CloudStorageAccount
C#
public static CloudStorageAccount FromConfigurationSetting (
	string settingName
)
C++
public:
static CloudStorageAccount^ FromConfigurationSetting (
	String^ settingName
)
J#
JScript

Parameters

settingName

Type: System.String

The name of the configuration setting.

Return Value

Type: Microsoft.WindowsAzure.CloudStorageAccount

A CloudStorageAccount constructed from the values in the configuration string.

Exceptions

Exception typeCondition
InvalidOperationException

Thrown if the global configuration setting publisher has not been configured, or if the configuration setting cannot be found.

Remarks

For more information about using connection strings, see Configuring Connection Strings.


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

See Also