나는 푸른 색 방울 저장소에서 이미지 목록을 가져 오는 예외 목록을 얻기 위해 Microsoft.WindowsAzure.StorageClient을 사용하고 있습니다. "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host"
. 이 예외를 어떻게 해결할 수 있습니까?azure blob storage- 전송 연결에서 데이터를 읽을 수 없습니다. 원격 호스트에서 기존 연결을 강제로 닫았습니다.
내 코드 :
var azureBlobStorageConnectionString = ConfigurationManager.AppSettings["AzureBlobStorageConnectionString"];
var azureBlobContainerName = ConfigurationManager.AppSettings["AzureBlobContainerName"];
// Retrieve storage account from connection string.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(azureBlobStorageConnectionString);
// Create the blob client.
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
// Retrieve reference to a previously created container.
CloudBlobContainer container = blobClient.GetContainerReference(azureBlobContainerName);
// Loop over items within the container and output the length and URI.
var containerList = container.ListBlobs().ToList();
ImagesUrls = new List<string>();
foreach (var item in containerList)
{
var blob = (CloudBlockBlob)item;
ImagesUrls.Add(blob.Uri.AbsolutePath);
}
왜 이런 이유로 작동하지? 나는 container.ListBlobs()에서 오류를 표시하는 매우 유사한 문제를 경험하고있다. 또한 컨테이너에 10K 이상의 얼룩이 생깁니다. – SammyG