I am trying to copy a blob from a source location to a destination location under lease. I am using a modified version of AutoRenewLease to be able to do this. Here are the steps in my code
- Create an empty destination blob if blob doesn't exist
- Obtain a regular 30 second lease (which I autorenew) on the blob with leaseId
- Use leaseId to create an AccessCondition object
- Pass the AccessCondition object to StartCopyFromBlobAsync as destAccessCondition
Actual Result: The remote server returned an error: (412) The lease ID matched, but the specified lease must be an infinite-duration lease.
Is there a way to workaround this issue and copy a blob without an infinite lease.