跨服务器和WCF的证书

跨服务器和WCF的证书,wcf,iis,certificate,ssl-certificate,wif,Wcf,Iis,Certificate,Ssl Certificate,Wif,我在一台服务器上运行一个网站、wcf服务和一个安全令牌服务STS。一切都很好。我现在正试图在服务器之间分离PEICE。当网站尝试登录以获取令牌时,我会收到ssl证书错误 当我调试时,这将出现在Server2008和IIS7.5以及我的Windows7IIS7.5上 An error occurred while making the HTTP request to https://x.x.x.x/STS/issue/wstrust/mixed/username. This could be du

我在一台服务器上运行一个网站、wcf服务和一个安全令牌服务STS。一切都很好。我现在正试图在服务器之间分离PEICE。当网站尝试登录以获取令牌时,我会收到ssl证书错误

当我调试时,这将出现在Server2008和IIS7.5以及我的Windows7IIS7.5上

An error occurred while making the HTTP request to https://x.x.x.x/STS/issue/wstrust/mixed/username. This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case. This could also be caused by...
我在STS服务器上生成了一个自签名证书,并将其导出到网站服务器。我还导出了密钥,并允许IIS访问网站服务器上的密钥。这已经通过了一系列WIF错误,它不会运行,但我不确定这样做是否正确

我也尝试过[netsh-http-add-sslcert-ipport:0.0.0:44400 ect…],但我不确定该使用哪个端口,我尝试了六个不同的端口,似乎都不起作用,443也不起作用

该网站正在使用WSTrustChannelFactory创建连接。它在频道上轰炸。在底部发出命令

 var factory = new WSTrustChannelFactory(
                 new UserNameWSTrustBinding(SecurityMode.TransportWithMessageCredential),
                 new EndpointAddress(signInEndpoint));
             factory.TrustVersion = TrustVersion.WSTrust13;

             factory.Credentials.UserName.UserName = userName;
             factory.Credentials.UserName.Password = password;

             var channel = factory.CreateChannel();

             var rst = new RequestSecurityToken
             { 
                 RequestType = RequestTypes.Issue,
                 AppliesTo = new EndpointAddress(realm),
                 KeyType = KeyTypes.Bearer
             };


             try
             {
                 var genericToken = channel.Issue(rst) as GenericXmlSecurityToken;
**编辑**

我还将网站服务器iis默认网站https绑定端口443设置为使用从STS服务器导入的证书,并得到相同的错误

**结束编辑**

我已经浏览了谷歌和stackoverflow,虽然很多问题似乎很接近,但没有一个得到认可的答案有效

想法?我是一个服务器/硬件noob,所以对于dummies的版本会很好


谢谢

由于您使用的是自签名证书,请确保关闭或将其添加到受信任的存储中。看起来你正在使用IdentityServer的url,在那里,您可以关闭强端点要求,并在客户端上使用仅具有消息安全性的UserNameWSTrustBinding。

它不起作用的原因是我的笔记本电脑与iis服务器不在同一个域中吗?我在尝试使用对IdentityServer的API调用时遇到了同样的问题。你解决过这个问题吗?当IdentityServer与客户端在同一台机器上运行时,我们遇到了这个问题,自签名证书位于受信任的CA根目录下。我没有尝试这个建议,但我理解链验证的需要,并且是正确的方向。