我在管理我的代碼中的Azure證書時遇到了一些困難。 事實上,我試圖使用Azure REST Services API(例如創建HTTP請求)來從我的Azure網站了解我的服務狀態。無法在本地Azure Web角色中添加證書VM
它在本地調試中運行良好,但我的web角色接口對證書管理器有一些限制。貝婁是我做的:
// this method stores a certificate from the resources
// to the local certificates manager
private X509Certificate2 StoreCertificate(Certificates certName)
{
X509Certificate2 newCert = null;
// get certificate from resources
newCert = this.GetCertificateFromResources(certName);
// store it into the local certificate manager
if (newCert != null)
{
var store = new X509Store(
StoreName.TrustedPeople,
StoreLocation.LocalMachine
);
store.Open(OpenFlags.ReadWrite);
store.Add(newCert);
}
// reset ref and try to load it from manager
newCert = null;
newCert = this.GetCertificate(certName);
return newCert;
}
當我嘗試添加證書時,Access被拒絕錯誤附加。
有什麼想法?我可以將證書存儲到Azure VM嗎? 我應該使用特殊位置來存儲這些嗎?
關於_「提升的權限」_這點是我需要的 - 謝謝。你提到你已經看到一些關於需要提升的權限的報告 - 你有沒有提及這個? – 2014-06-07 16:49:52