开发者

Azure management API returns 500 Internal Server Error

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 contains the Subscription ID copied from the Management Portal (only one subscription). SERVICE_NA开发者_JAVA百科ME 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.

The certificate was made according to Microsoft's makecert instructions using the Windows SDK 7.1. Deployment was uploaded manually.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜