Skip to content

This sample shows how to generate and use shared access signatures (SAS). The sample demonstrates how to create both an ad-hoc SAS and a SAS associated with a stored access policy.

License

Notifications You must be signed in to change notification settings

Azure-Samples/storage-dotnet-sas-getting-started

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

page_type languages products description urlFragment
sample
csharp
azure
This sample shows how to generate and use shared access signatures.
storage-dotnet-sas-getting-started

Getting Started with Shared Access Signatures (SAS)

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.

Running this sample

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):

  1. 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.
  2. Set breakpoints and run the project using F10.

To run the sample using a storage account

  1. 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=[]...)
  2. 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
  3. Set breakpoints and run the project using F10.

More information

About

This sample shows how to generate and use shared access signatures (SAS). The sample demonstrates how to create both an ad-hoc SAS and a SAS associated with a stored access policy.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Languages