1
votes

I've used Azure Storage(Blobs) to store files.

Now I'm planning to migrate to Data Lake Gen2. Unfortunately, after I've switched connection string to gen2 storage it shows 400 Error with Bad Request to me on ListBlob() method.

Code example:

var storageAccount = CloudStorageAccount.Parse(connectionString);
var myClient = storageAccount.CreateCloudBlobClient();
var container = myClient.GetContainerReference(containerName);
var dirRef= container.GetDirectoryReference(directory);
var blobs = dirRef.ListBlobs();

So, when I'm trying to iterate blobs it generates an exception. Does anyone have experience with this?

1

1 Answers

2
votes

It is a known issue, see Known issues with Azure Data Lake Storage Gen2.

Blob Storage APIs and Azure Data Lake Gen2 APIs aren't interoperable with each other.

Blob storage APIs aren't yet available to Azure Data Lake Storage Gen2 accounts.

These APIs are disabled to prevent inadvertent data access issues that could arise because Blob Storage APIs aren't yet interoperable with Azure Data Lake Gen2 APIs.