locked
Blob Signature URI refresh RRS feed

  • Question

  • Hi, I have questions.

    1-) I'm curious about Sas,in my ASP.Net project when I create sas uri in page load for my file downloading,  expire date is 15min,when the same user reload the page will be create a new Sas uri ? the old SAS URI was not expired but the user reload the page .

    Or in button click same scenario it doesn't matter..

    2.-) Why can I not add the IEnumerable<IListBlobItem> blobList in my VİEWSTATE ? I will save sas uri for 15min
    Sunday, April 23, 2017 5:55 PM

Answers

All replies

    1. If the user hits expiry time, the link is no longer valid.

    To clarify: After the expiry time user was able to download the url?

    Start time. This is the time at which the SAS becomes valid. The start time for a shared access signature is optional. If a start time is omitted, the SAS is effective immediately. The start time must be expressed in UTC (Coordinated Universal Time), with a special UTC designator ("Z"), for example 1994-11-05T13:15:30Z.

    Expiry time. This is the time after which the SAS is no longer valid. Best practices recommend that you either specify an expiry time for a SAS, or associate it with a stored access policy. The expiry time must be expressed in UTC (Coordinated Universal Time), with a special UTC designator ("Z"), for example 1994-11-05T13:15:30Z

    For more information; Refer here

    One way that you can manage a shared access signature is to control its lifetime by setting the signed expiry field of the access policy. If you want to continue to grant a client access to the resource after the expiry time, you must issue a new signature. It’s recommended that you keep the lifetime of a shared access signature short. Before version 2012-02-12, a shared access signature not associated with a stored access policy could not have an active period that exceeded one hour.

    2.   IEnumerable cannot add to viewstate and couldn't be a datasource to gridview. IListBlobItem is an interface.The IEnumerable contains three type of blob items.

    CloudBlockBlob,CloudPageBlob,CloudBlobDirectory

    So, I would suggest you could firstly check the type and convert to datatable or something else and then add it into ViewState.


    Monday, April 24, 2017 3:47 PM
  • First, thank you for your beautiful expression.I solved second problem..

    But I dont understand the expirying , think now I have a user and he his uplaoding 1GB file to in my container.

    Okey I hold my expiry date in my server cache and before 10 min I refresh my sas . But the user who upload 1GB file on the half his uploading the sas is expired what will happen to his uploading  ?


    Monday, April 24, 2017 11:05 PM
  • Since the authorization request has already occurred, the upload will continue.

    Tuesday, April 25, 2017 3:00 PM
  • Great  :)  Thank you really is there any document about what you say I will learn like this things.
    Tuesday, April 25, 2017 4:51 PM
  • The below mentioned link will provide you the more information shared access signatures (SAS).

    https://docs.microsoft.com/en-us/azure/storage/storage-dotnet-shared-access-signature-part-1

    Refer here for more information on Create and use a SAS with Blob storage

    Delegating Access with a Shared Access Signature

    Wednesday, April 26, 2017 12:00 PM