Azure.Storage.Blobs connect to Storage account via Private Endpoint (using local IP address)

Sergey Gorbushin 1 Reputation point
2021-01-28T12:34:49.263+00:00

Hi!
I use Azure.Storage.Blobs, Version=12.8.0.0 in my .net core project. My storage account has a private endpoint with a local IP (e.g. 10.1.1.1). I want to access the blob storage via the local IP to ensure, that my data goes internal only.

When I'm tying to use the IP address in connection string (;EndpointSuffix=core.windows.net -> ;EndpointSuffix=10.1.1.1) to use constructor BlobContainerClient(string connectionString, string blobContainerName), I'm getting an error "No valid combination of account information found."

If I'm trying to user constructor BlobContainerClient(Uri blobContainerUri, StorageSharedKeyCredential credential, BlobClientOptions options = null) with blobContainerUri "http://10.1.1.1/tmp", BlobContainerClient instance makes AccountName = "tmp", and Name = "", because its url pattern is "https://{account_name}.blob.core.windows.net/{container_name}". And I'm getting an error "HTTP Error 400. The request hostname is invalid"

How should I use the BlobContainerClient with a local IP address?

Azure Storage
Azure Storage

Globally unique resources that provide access to data management services and serve as the parent namespace for the services.

Azure Private Link
Azure Private Link

An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.

Developer technologies | .NET | .NET Runtime

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.