有没有什么办法可以在NetTcpBinding中使用WCF SSL,而不需要在客户端计算机上安装客户端证书? (如果我没有弄错,请使用SSL V2)。在没有客户端证书的情况下通过Tcp使用Wcf SSl证书(仅服务器端)
我们希望服务器证书将在客户端的可信存储中进行身份验证 并通过服务器的公钥对其消息进行加密,这意味着只有服务器计算机将持有私钥证书。
我们在两侧都使用NetTcpBinding而不是customBinding。 如果它可以完成,它的正确配置是什么? (在客户端&服务器配置)
在此先感谢。
这是我的wcf配置。
服务器配置:
<configuration>
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="TcpSecureBinding">
<security mode="Transport">
<transport clientCredentialType="Certificate"/>
</security>
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceCredentialsBehavior">
<serviceDebug includeExceptionDetailInFaults="True" />
<serviceMetadata httpGetEnabled="true" />
<serviceAuthorization
principalPermissionMode="UseWindowsGroups">
</serviceAuthorization>
<serviceCredentials>
<windowsAuthentication includeWindowsGruops="true"
allowAnonymousLogons="false"/>
<clientCertificate>
<authentication certificateValidationMode="none"/>
</clientCertificate>
<serverCertificate
findValue="thumbprint"
storelocation="LocalMachine"
x509FindType="FindMyThumbprint"
storeName="My"/>
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="ServiceCredentialsBehavior"
name="ServiceModel.Calculator">
<endpoint address="net.tcp://localhost:8040/Calculator"
binding="netTcpBinding"
bindingConfiguration="TcpSecureBinding"
contract="ServiceModel.ICalculator" >
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
</service>
</services>
</system.serviceModel>
</configuration>
客户端配置:
<configuration>
<system.serviceModel>
<client>
<endpoint address="net.tcp://localhost:8040/Calculator"
behaviorConfiguration="endpointCredentialBehavior"
binding="netTcpBinding"
bindingConfiguration="Binding1"
contract="ServiceModel.ICalculator">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
</client>
<behaviors>
<endpointBehaviors>
<behavior name="endpointCredentialBehavior">
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<netTcpBinding>
<binding name="Binding1">
<security mode="Transport">
<transport clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
</configuration>
IM加入我当前的服务器&客户CONFIGS。 另一个问题:
在身份验证级别,我们希望客户端进行身份验证疗法服务器的证书 (我想服务器的公钥应该在trustedPeople店),这可能吗?
您是否建议使用传输安全或邮件?
如果我们想通过NTLM(clientCredentialType =的Windows)来验证客户端&服务器 是它除了可以完成服务器的证书认证或只可应用于其中之一吗?到目前为止,我们已经使用NTLM身份验证。
现在即时得到异常: “的请求的升级不支持‘的net.tcp://服务器名称:8040/**’。这可能是由于不匹配的绑定(例如启用安全性上客户端而不是服务器上)。“ 我明白这个错误发生,因为客户端使用Windows安全和服务器在om证书, ,但当im更改客户端安全证书也,即时获取错误: “未提供客户端证书”。但我不想设置客户端证书,这是我主要问题的一部分。
我们看到,我们可以使用服务器证书验证此标签:
<identity> <certificate encodedValue="encoded certificate"/> </identity>
但是,我认为这验证通过身份由一个编码的证书时,我们preffer完成了证书的鉴定将通过在客户端存储中搜索服务器的公钥(trustedPeople)来执行。这些信息真的是真的吗?这种身份的这个标签替代搜索客户端“S值得信赖的商店公钥?
希望你能够帮助这个方式,再次 感谢。
这是可能的。你试过什么了? – Bernard
除非您特别要求提供客户证书,否则您不需要客户证书;你的绑定配置是什么样的? –
有人可以帮我解决我们的问题吗? – AmirT