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.
Branch: master
Clone or download
mhopkins-msft Merge pull request #4 from mhopkins-msft/master
Updated to NuGet packages v10.0.2.
Latest commit de93b09 May 7, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
SasTutorial Updated to NuGet packages v10.0.2. May 6, 2019
.gitignore adding sample for SAS Mar 29, 2016
CONTRIBUTING.md Initializing repository files. Aug 5, 2016
LICENSE Initializing repository files. Mar 28, 2016
README.md adding sample for SAS Mar 29, 2016
SasTutorial.sln adding sample for SAS Mar 29, 2016

README.md

services platforms author
storage
dotnet
tamram

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

You can’t perform that action at this time.