The certificate 'CN=WCFHTTPS' must have a private key that is capable of key exchange. The process must have access rights for the private key.
使用 makecert 建立憑證時未指定 -sky exchange,導致私鑰標記為「簽名」用途而非「金鑰交換」,WCF 傳輸/訊息安全需私鑰支援加密解密操作。此外,進程身分可能缺乏讀取私鑰權限。
makecert -sr localmachine -ss My -n "CN=MyServerCer" -sky exchange -pe -r
-pe(私鑰可匯出)即代表可交換金鑰,實際需 -sky exchange。