WCF客户端证书停止工作

7
在跟随几篇MSDN文章后,我让客户端证书和用户名密码用于我的WCF服务。客户端需要证书和用户名密码才能访问我的服务。
最近,证书停止工作了,我可以在不提供客户端证书的情况下访问服务。我正在使用SOAP UI测试客户端。通常我需要将客户端证书添加到密钥库中,然后指定哪个密钥用于请求。
最近我设置了一个测试,我不必提供客户端证书。我的配置没有改变,这是正确的设置吗?
谢谢。
我的绑定配置:
 <wsHttpBinding>
        <binding name="BasicBinding">
          <security mode="TransportWithMessageCredential">
            <transport clientCredentialType="Certificate" />
            <message clientCredentialType="UserName" negotiateServiceCredential="false" establishSecurityContext="false" />

          </security>

        </binding>
      </wsHttpBinding>

我的服务:

<service behaviorConfiguration="APIServiceBehaviour" name="Service">
        <endpoint address="api" binding="wsHttpBinding" bindingConfiguration="BasicBinding" name="soap-api" bindingNamespace="https://myserver.com" contract="IAIService" />
        <host>
          <baseAddresses>
            <add baseAddress="https://myserver.com" />
          </baseAddresses>
        </host>
      </service>

行为表现:
      <serviceAuthorization principalPermissionMode="Custom">
        <authorizationPolicies>
          <add policyType="MyAuthorizationPolicy,MyProject" />
        </authorizationPolicies>
      </serviceAuthorization>

      <serviceCredentials>

        <serviceCertificate findValue="tempSClient" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" />
        <userNameAuthentication userNamePasswordValidationMode="Custom" includeWindowsGroups="false" customUserNamePasswordValidatorType="MyProject.UserAuth,MyProject" />
      </serviceCredentials>

    </behavior>

你为什么认为它之前可以正常工作? - Evk
我一直收到403错误。当我添加了客户端证书后,它允许我使用Web服务安全进行身份验证。 - Allan
MyProject.UserAuth 看起来是什么样子? - sc3w
1个回答

1
证书有过期日期。 你在 certmgr.msc 中检查了你的证书吗?

是的。证书没问题。 - Allan

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接