WCF - SSL 服务 [英] WCF - SSL Service

查看:18
本文介绍了WCF - SSL 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一项使用 SSL 的服务.当我尝试浏览到该服务时,出现以下错误:

I have a service that uses SSL. When I try to browse to the service I get the following error:

The SSL settings for the service 'SslRequireCert' does not match those of the IIS 'None'. 

我的配置如下:

<security mode="Transport">
        <transport clientCredentialType="Certificate" />
      </security>

我正在使用 IIS Express 并且我已选中启用 SSL"(在 WebMatrix 中验证).

I am using IIS Express and I have "Enable SSL" checked (verified in WebMatrix).

知道我还需要做什么吗?

Any ideas what else I need to do?

推荐答案

好的.看起来我需要更新 applicationhost.config 文件(在 IIS Express 中).我为我的网站添加了一个位置并设置了 sslFlags="Ssl, SslAcceptCert, SslRequireCert".这允许我启用 SSL 身份验证.然后,当我尝试通过客户端访问该服务时,我收到一条消息,指出建立信任关系时出错.这是因为我的受信任的人文件夹中没有服务器的证书(或者它可能是客户端,我不确定因为服务和客户端在我的本地 PC 上).这样做之后,服务就可以工作了,但是我们不想将我们的证书提供给客户端,所以我最终使用了 TransportWithMessageCredential 安全模式.

Ok. It looks like I needed to update the applicationhost.config file (in IIS Express). I added a location for my site and set sslFlags="Ssl, SslAcceptCert, SslRequireCert". This allowed me to enable SSL authentication. Then when I tried to access the service with a client I got a message that there was an error establishing a trust relationship. This was because I did not have the server's certificate in my trusted people folder (or it might have been the client, I'm not sure as the service and client is on my local PC). After doing that, the service will work, however we do not want to have to give our certificate to the client, so I ended up using the TransportWithMessageCredential security mode.

这篇关于WCF - SSL 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆