Azure管理API返回500内部服务器错误 [英] Azure management API returns 500 Internal Server Error

查看:386
本文介绍了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.

这篇关于Azure管理API返回500内部服务器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆