Azure / azure-storage-net

Microsoft Azure Storage Libraries for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BlobClient, file intermittently not released with UploadAsync

dimula opened this issue · comments

commented

Which service(blob, file, queue, table) does this issue concern?

Blob

Which version of the SDK was used?

v4.0.30319

Which platform are you using?

.Net 4.8

What problem was encountered?

Exception on File.Delete: System.UnauthorizedAccessException
Message: Access to the path '\RC14DP09\file_name.pdf' is denied.

How can we reproduce the problem in the simplest way?

        var client = containerClient.GetBlobClient(blobName);
        using (var fileStream = File.OpenRead(filePath))
        {
            await client.UploadAsync(fileStream, overwrite);
        }
        File.Delete(filePath);

File exists on network drive.
Happens ocasionally.

Have you found a mitigation/solution?

No

commented

I think it has nothing to do with BlobClient