这里描述了确切的问题: http://support.microsoft.com/kb/2801679 。
2012年12月Windows更新后,许多证书被添加到AuthRoot商店。所以我们必须删除它们才能解决问题。
为了实现它我使用PowerShell启动任务:
Get-ChildItem -Path Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SystemCertificates\AuthRoot\Certificates | Where-Object {$_.Name -notlike "*\<YOUR_CERTIFICATE_THUMBPRINT>"} | Remove-Item
要从CMD启动任务运行它:
PowerShell -ExecutionPolicy Unrestricted .\Startup.ps1 exit /b %errorlevel%
在ServiceDefinition.csdef中:
<WebRole name="Web"> <Startup> <Task commandLine="Startup.cmd" executionContext="elevated" taskType="simple" /> </Startup> <!-- ... -> </WebRole>