Reputation: 309
I have a game site on cloud and All member can access this games with Azure SAS URL. I set expiration to be 20 minutes and I want to handle When the time is finished , I want to handle expiration and Redirect to user home page or Regenarate SAS Url .
Do you know any idea about this situation ?
Upvotes: 2
Views: 870
Reputation: 30903
The scenario you are describing will require some custom code to live on the Storage Service layer. Which is not supported. You typically know when the SAS expires, because you generated it. But can't know / understand when the end user of your Web Application uses this SAS.
A possible workaround is to make sure you renew this SAS and send it to the client with every (authenticated) request a browser will make to your app.
Another way to handle this, is to have a small jQuery/WebApi based module, which will live inside user's browser. That module will periodically require SAS from the Server. At best, the server will also return Expire time, so your client side script may handle this appropriately. On the client side before each request for a "game", your script shall check whether SAS Url is expired or not.
Upvotes: 1