From this MSDN article it says that the connection string for connecting to the storage account must be HTTP and not HTTPS.
When I use this constructor:
public CloudDrive (
Uri uri,
StorageCredentials credentials
)
Does that mean the Uri to the page blob must also be HTTP and not HTTPS? I am a bit confused regarding which parameter (or both together) fits the 'connection string' description.
This scenario does not seem to be easily testable in dev emulator.
The URI
(think of as the server-portion of the connection string) to the page blob represents the namespace + container + blob of your storage account. The credentials
represent the user/pass which together with the URI
comprise the connection string to the Azure cloud storage service.
The URI
will always be HTTP assuming you are using the local emulator.
CloudStorageAccount storageAccount = CloudStorageAccount.DevelopmentStorageAccount;
When deploying to Azure, the URI
scheme will be whatever you assign it in the service configuration (ServiceDefinition.csdef / ServiceConfiguration.Cloud.cscfg).
CloudStorageAccount storageAccount = CloudStorageAccount.FromConfigurationSetting("CloudDrive.DataConnectionString");
You would just want to assign CloudDrive.DataConnectionString
to have DefaultEndpointsProtocol=http
(the default if omitted, but you could be explicit).
<ServiceDefinition>
<WebRole>
<!-- .... -->
<ConfigurationSettings>
<Setting name="CloudDrive.DataConnectionString" />
</ConfigurationSettings>
</WebRole>
</ServiceDefinition>
<ServiceConfiguration>
<Role>
<ConfigurationSettings>
<Setting name="CloudDrive.DataConnectionString" value="DefaultEndpointsProtocol=http;AccountName=YOURNAMESPACE;AccountKey=YOURKEY" />
</ConfigurationSettings>
</Role>
</ServiceConfiguration>