Oliver Bock
Oliver Bock

Reputation: 5115

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_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.

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

Upvotes: 2

Views: 3443

Answers (1)

Oliver Bock
Oliver Bock

Reputation: 5115

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.

Upvotes: 2

Related Questions