Azure / azure-storage-net

Microsoft Azure Storage Libraries for .NET
Apache License 2.0
446 stars 373 forks source link

BlobClient, file intermittently not released with UploadAsync #1085

Closed dimula closed 1 year ago

dimula commented 1 year ago

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

dimula commented 1 year ago

I think it has nothing to do with BlobClient