wsHttpBinding을 사용하여 WCF 서비스를 호스팅하려고합니다. makecert를 사용하여 인증서를 만들고 web.config에 몇 줄을 추가했습니다. 최대 인터넷 검색에.net에서 wsHttpBinding WCF 서비스 설정을 돕기
System.ArgumentException: The certificate 'CN=WCfServer' must have a private key that is capable of key exchange. The process must have access rights for the private key.
는 인증서 파일에 대한 액세스 권한을 가진 몇 가지 문제가있을 것 같다 :
이
내가지고있어 오류입니다. cacls를 사용하여 NETWORK SERVICE 및 사용자 이름에 대한 읽기 권한을 부여했지만 아무 것도 변경하지 않았습니다.또한 인증서 파일의 등록 정보에서 보안 설정으로 이동하여 NETWORK SERVICE 및 사용자 이름을 완전히 제어했습니다. 다시는 아무 소용이 없습니다.
문제가 무엇이고 정확히 무엇을해야하는지 안내해 줄 수 있습니까? 나는이 증명서 물건으로 정말로 색다른. 인증서의 구성에 문제가있는 것처럼 웹에서 수집 할 수있는 건
<system.serviceModel>
<services>
<service name="Abc.Service" behaviorConfiguration="Abc.ServiceBehavior">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="Abc.BindConfig" contract="Abc.IService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Abc.ServiceBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
<serviceCredentials>
<clientCertificate>
<authentication certificateValidationMode="PeerTrust"/>
</clientCertificate>
<serviceCertificate findValue="WCfServer" storeLocation="CurrentUser" storeName="My" x509FindType="FindBySubjectName" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="Abc.BindConfig">
<security mode="Message">
<message clientCredentialType="Certificate" />
</security>
</binding>
</wsHttpBinding>
</bindings>
</system.serviceModel>