새 Windows Azure SDK for .NET을 사용하여 모든 가상 컴퓨터 목록을 가져오고 싶습니다.Azure .NET SDK - 인증에 실패한 모든 가상 컴퓨터 나열
// This is a custom cert I made locally. I uploaded it to Azure's Management Certificates and added it to my local computer's cert store, see screenshot below.
X509Certificate2 myCustomCert = await this.GetAzureCert();
var credentials = new CertificateCloudCredentials(mySubscriptionId, myCustomCert);
using (var cloudServiceClient = CloudContext.Clients.CreateCloudServiceManagementClient(credentials))
{
credentials.InitializeServiceClient(cloudServiceClient); // Is this required? The next call fails either way.
// This line fails with exception: "The server failed to authenticate the request. Verify that the certificate is valid and is associated with this subscription."
var services = await cloudServiceClient.CloudServices.ListAsync(CancellationToken.None);
}
내 첫번째 생각은 인증서가 나쁜이었다, 그러나 나는 성공적으로 내 사용자 지정 인증서를 사용하여 푸른 REST API를 호출 할 수 있어요 :
초기 문서를 조립할, 여기에 내가 생각 해낸거야. 아래에서 볼 수 있듯이, 제대로 내 가입과 푸른 관리 인증서에 추가하고 관련이 : 내가 잘못 뭐하는 거지
?
당신은 락, 브래디! # winning –
땀이 전혀 들지 않습니다. 다른 이상한 점이 있으면 주저하지 말고 연락하십시오. GitHub 사이트를 통해 문제를 신고 할 수도 있습니다. –