C# Azure Storage Blob Upload TransactionScope -


is there somewhere class allow roll transactionscope on azure blockblob actions ?

i make works:

  cloudblockblob blockblob;      private void uploadpicture(stream istream)     {         using(var ts = new transactionscope())         {             blockblob.uploadfromstream(istream);              throw new exception();             ts.complete();         }     } 

when exception raise, uploaded file not cancelled. if not possible transaction scope, how should proceed ?

azure storage client library not provide support. if, however, cancellation support acceptable scenario, can use uploadfromstreamasync api cancellationtoken. while asynchronously uploading blob, can cancel operation. depending on operation's current progress, try abort upload.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -