現在、Azureクラウドサービス(Webおよびワーカーの役割)を.Net4.5Frameworkにアップグレードしようとしています。このためには、Azureの展開をWindowsServer2008からWindowsServer2012に変更する必要があります。
これには、ServiceConfigurationファイルでOSFamilyを「1」から「3」に変更する必要があります。
現在のシステム
- .Net 4.0
- MVC3
- EF 4.4
- Azure Tools 1.6
- Visual Studio 2010
- Windows Server 2008
アップグレードされたシステム
- .Net 4.5
- MVC4
- EF 5
- Azure Tools 1.8
- Visual Studio 2012
- Windows Server 2012
Azure証明書をクエリして、「本番」環境と「ステージング」環境のどちらを使用しているかを確認すると、問題が発生します。
次のコード行は、証明書を検索します。わかりやすくするために短縮しました。
// Open the certificate store for the current user.
X509Store certStore = new X509Store(StoreName.My, StoreLocation.CurrentUser);
certStore.Open(OpenFlags.ReadOnly);
foreach (var cert in certStore.Certificates)
{
OutputToFile.OutputDataReceived("Cert - " + cert.FriendlyName + " -- Thumb -- " + cert.Thumbprint);
}
// Find the certificate with the specified thumbprint.
X509Certificate2Collection certCollection = certStore.Certificates.Find(
X509FindType.FindByThumbprint,
thumbPrint,
false);
// Close the certificate store.
certStore.Close();
ご覧のとおり、証明書の詳細をログファイルに出力して、どこで故障したかを確認しています。OSFamily = "1"(Windows Server 2008)では、これは完全に機能します。証明書を検索します。
ただし、OSFamily = "3"(Windows Server 2012)を設定すると、ログファイルはループからの証明書の詳細を出力しません。
ローカルでも正常に動作します。
これはWindowsServer2012の問題ですか、それともAzureの展開の問題ですか?Windows Server 2012に移行してから、証明書を使用して追加の手順を実行する必要がありますか?
どんな方向でも大歓迎です。