Azure管理API返回500内部服务器错误
我收到500内部服务器错误,从这个请求在Azure REST API管理回来。为什么呢?
I am getting 500 Internal Server Error back from the Azure REST management API with this request. Why?
X509Certificate cert = X509Certificate2.CreateFromCertFile(cert_path);
string uri = String.Format("https://management.core.windows.net/{0}/services/hostedservices/{1}/deploymentslots/staging",
SUBSCRIPTION_ID, SERVICE_NAME);
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);
request.Headers.Add("x-ms-version", "2009-10-01");
request.ClientCertificates.Add(managementCertificate);
request.GetResponse();
SUBSCRIPTION_ID包含了从管理门户(只有一个订阅)复制认购ID。 SERVICE_NAME包含的唯一托管服务的DNS preFIX。这些URI做工精细:
SUBSCRIPTION_ID contains the Subscription ID copied from the Management Portal (only one subscription). SERVICE_NAME contains the DNS Prefix from the only hosted service. These URIs work fine:
https://management.core.windows.net/{0}/services/hostedservices
https://management.core.windows.net/{0}/services/hostedservices/{1}?request-detail=true
后者则要求甚至列出了分期部署,并表示一切都很好。
The latter request even lists the staging deployment and indicates all is well.
该证书是根据使用Windows 微软的makecert作出指示SDK 7.1。部署手动上传。
The certificate was made according to Microsoft's makecert instructions using the Windows SDK 7.1. Deployment was uploaded manually.
我提交的问题Microsoft支持。他们已经表明,是当你的DNS preFIX只有一个长度的字符被触发在Azure中的错误。
I submitted the problem to Microsoft support. They have indicated that there is a bug in Azure that is triggered when your DNS Prefix is only one character in length.