I have an ASP.NET MVC application that connects to Azure blob storage; locally everything is fine and I can connect to blob storage and access my containers and list blobs, but once deployed I get this error:
Azure.RequestFailedException: The remote name could not be resolved: 'MyAccountName.blob.core.windows.net'
Does anyone have an idea how to solve this error?
Here is the container code for connecting to the Azure Blob
public ActionResult QuickPhotos()
{
string storageConnectionString = ConfigurationManager.ConnectionStrings["AZURE_STORAGE_CONNECTIONSTRING"].ConnectionString;
string containerName = "infoimages";
BlobContainerClient blobContainerClient = new BlobContainerClient(storageConnectionString, containerName);
List<string> Images = new List<string>();
foreach (BlobItem item in blobContainerClient.GetBlobs())
{
Images.Add("https://azureblob.interstellarseries.com/" + containerName +"/"+item.Name);
}
return View(Images);
}