我創建的驗證方法簡單的WCF項目,這個配置你可以看到:找不到X.509證書:STORENAME「我」,StoreLocation「LOCALMACHINE」
<serviceCertificate findValue="STSTestCert"
storeLocation="LocalMachine"
x509FindType="FindBySubjectName"
storeName="My"/>
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
但是當我運行該項目,我得到這個錯誤:
不能使用下面的搜索找到的X.509證書CRI teria:StoreName'我',StoreLocation'LocalMachine',FindType'FindBySubjectName',FindValue'STSTestCert'。 描述:執行當前Web請求期間發生未處理的異常。請查看堆棧跟蹤以獲取有關該錯誤的更多信息以及源代碼的位置。
異常詳細信息:System.InvalidOperationException:使用以下搜索條件找不到X.509證書:StoreName'My',StoreLocation'LocalMachine',FindType'FindBySubjectName',FindValue'STSTestCert'。