Reputation: 103
I'm looking into using Azure Blob Storage and, from looking at several tutorials, I get that one can access the blob storage through a connection string or using StorageCredentials.
Is there a best practice? Or do both serve a different purpose?
Cheers, B.
Upvotes: 3
Views: 1138
Reputation: 3137
Both StorageCredentials and connection string are used to connect to Storage Account using Azure SDKs.
Both StorageCredentials and connection string serve the same purpose.
StorageCredentials class supports both SAS token and account name, account key
Even the connection string supports both SAS Token and account name, account key
For more information about StorageCredentials, please refer: StorageCredentials Class (Microsoft.Azure.Storage.Auth) - Azure for .NET Developers | Microsoft Docs
For more information about Connection String, please refer: Configure a connection string - Azure Storage | Microsoft Docs
Upvotes: -1