客户端证书在BizTalk 2013r2上使用的IIS托管WCF服务上的位置

问题描述 投票:0回答:1

我的Windows客户端证书有问题,在我从开发人员那里继承而来的系统上,他没有记录他的工作。基本上,当我尝试使用Postman连接到IIS托管的Web服务时,在事件日志中会告诉我

无法使用以下搜索条件找到X.509证书:StoreName'My',StoreLocation'CurrentUser',FindType'FindByThumbprint',FindValue'THUMBPRINTVALUE']

现在我已将证书安装到我能想到的所有位置。

这里是我所做工作的详细说明。

我有一个IIS托管的WCF服务,该服务通过防火墙暴露给Internet。 WCF服务的URL绑定到BizTalk Server 2013r2上的接收位置,接收位置的类型为WCF-WebHttp,并且已为该接收位置设置了客户端证书。

我正在使用邮递员连接到上述URL,并按照文档描述向邮递员注册了客户端证书,并且返回了以下错误页面

HTTP错误500.0-System.ServiceModel.ServiceActivationException

在事件日志查看器中,我得到以下条目:

 Sender Information: System.ServiceModel.ServiceHostingEnvironment+HostingManager/62476613
 Exception: System.ServiceModel.ServiceActivationException: The service '/HL7/ORU/R01/HTTPBasic/Service1.svc' cannot be activated due to an exception during compilation.  The exception message is: Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'CurrentUser', FindType 'FindByThumbprint', FindValue '*THUMBPRINTVALUE*'.. ---> System.InvalidOperationException: Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'CurrentUser', FindType 'FindByThumbprint', FindValue '*THUMBPRINTVALUE*'.
   at System.ServiceModel.Security.SecurityUtils.GetCertificateFromStoreCore(StoreName storeName, StoreLocation storeLocation, X509FindType findType, Object findValue, EndpointAddress target, Boolean throwIfMultipleOrNoMatch)
   at System.ServiceModel.Security.SecurityUtils.GetCertificateFromStore(StoreName storeName, StoreLocation storeLocation, X509FindType findType, Object findValue, EndpointAddress target)
   at System.ServiceModel.Security.X509CertificateRecipientServiceCredential.SetCertificate(StoreLocation storeLocation, StoreName storeName, X509FindType findType, Object findValue)
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.BtsServiceHostBase.SetServiceCertificate()
   at Microsoft.BizTalk.Adapter.Wcf.Runtime.BtsServiceHostBase.InitializeRuntime()
   at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
   at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
   --- End of inner exception stack trace ---
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity)
   at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath, EventTraceActivity eventTraceActivity)
 Process Name: w3wp
 Process ID: 7080

我知道此错误的含义,它无法在StoreName'My'和StoreLocation'CurrentUser'中找到带有指纹THUMBPRINTVALUE的证书。

在这种情况下,我是CurrentUser,我已经向以下用户添加了证书指纹THUMBPRINTVALUE,这些用户都是我认为与Web服务关联的用户。

  • IIS服务帐户
  • BizTalk服务帐户
  • 与与应用程序池关联的用户承载了IIS托管的WCF服务

我想念的是什么?

wcf iis biztalk client-certificates biztalk-2013
1个回答
0
投票

HTTP 500错误通常表示服务器运行状态有问题。它与客户端无关。实际上,确实存在一项使用证书对客户端进行身份验证的服务。在这种情况下,我们需要提供一个客户端证书来调用该服务。但是,从错误消息来看,服务器端的WCF存在问题。致电之前,请确认服务是否正常运行。建议您在浏览器中访问以下URL页面,以检查服务是否正常运行。

https://myserver/service1.svc

结果。enter image description here对于IIS中托管的WCF需要服务证书,这通常是由IIS中的站点绑定模块完成的。https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/how-to-configure-an-iis-hosted-wcf-service-with-ssl请随时告诉我是否有什么我可以帮助的。

© www.soinside.com 2019 - 2024. All rights reserved.