Open erdembayar opened 5 months ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.
I tried some various storage API calls with and only blob download seems to fail when ?
is present in SharedAccessSignature
. Code I used:
using System;
using System.Threading.Tasks;
using Azure;
using Azure.Storage.Blobs;
using Azure.Storage.Blobs.Models;
class Program
{
static async Task Main(string[] args)
{
const string connectionString = "BlobEndpoint=https://<my storage account>.blob.core.windows.net/;SharedAccessSignature=?ss=b&sv=2022-11-02&srt=sco&sp=rl&se=2024-06-04T09:09:36Z&st=2024-06-04T01:09:36Z&spr=https&sig=<signature>";
// Create the BlobServiceClient using the connection string
BlobServiceClient blobServiceClient = new BlobServiceClient(connectionString);
try
{
await foreach (BlobContainerItem client in blobServiceClient.GetBlobContainersAsync())
{
Console.WriteLine($"Container name: {client.Name}");
}
var containerClient = blobServiceClient.GetBlobContainerClient("container");
await foreach (BlobItem blob in containerClient.GetBlobsAsync())
{
Console.WriteLine($"Blob name: {blob.Name}");
}
var blobClient = containerClient.GetBlobClient("blob.json");
var content = await blobClient.DownloadContentAsync(); // only this line fails
Console.WriteLine("done");
}
catch (RequestFailedException ex)
{
Console.WriteLine($"Error: {ex.Message}");
Console.WriteLine($"ErrorCode: {ex.ErrorCode}");
Console.WriteLine($"Status: {ex.Status}");
}
}
}
When this issue would be triaged @JoshLove-msft @jsquire?
@erdembayar: This issue has been triaged and assigned to the Azure Storage team who own the package. We do not have insight into their process or when they may address this.
Library name and version
Azure.Storage.Blobs 12.20.0
Describe the bug
I have following C# project with net472 tfm. If I use
SharedAccessSignature=?sv=2018-03-28&ss=b&srt=co&sp=rcw&se=2025-01-01T21:30:06Z&spr=https&sig=xxxxxxxx%3D
instead ofSharedAccessSignature=sv=2018-03-28&ss=b&srt=co&sp=rcw&se=2025-01-01T21:30:06Z&spr=https&sig=xxxxxxxx%3D
then I get error. Same code works fine with net6.0 sdk with?
in front of SAS.AccessBlobStorageByConnectionString.zip
Expected behavior
There should be no behavior difference between net472 and net6.0 for same
package + Id
.Actual behavior
It doesn't work if
?
in front of the SASReproduction Steps
See my C# project and use your own blob storage settings AccessBlobStorageByConnectionString.zip
Environment
Version 17.11.0 Preview 1.1 , sdk 8.0.400-preview.0.24276.1