services | platforms | author |
---|---|---|
storage |
dotnet |
tamram |
This sample shows how to generate and use shared access signatures. With a shared access signature, you can delegate access to resources in your storage account, without sharing your account key. The sample demonstrates how to create both an ad-hoc SAS and a SAS associated with a stored access policy.
If you don't already have a Microsoft Azure subscription, get started with a FREE trial account.
By default, this sample is configured to run against the storage emulator. You can also modify it to run against your Azure Storage account.
To run the sample using the storage emulator (default option):
- Start the Azure storage emulator (once only) by pressing the Start button or the Windows key and searching for it by typing "Azure storage emulator". Select it from the list of applications to start it.
- Set breakpoints and run the project using F10.
To run the sample using a storage account
- Open the app.config file and comment out the connection string for the emulator (UseDevelopmentStorage=True) and uncomment the connection string for the storage service (AccountName=[]...)
- Create a storage account through the Azure Portal and provide your [AccountName] and [AccountKey] in the App.Config file. See http://go.microsoft.com/fwlink/?LinkId=325277 for more information
- Set breakpoints and run the project using F10.