【发布时间】:2013-04-13 09:02:46
【问题描述】:
我有一个 WPF 应用程序,我正在使用 WCF 通过 Https 使用 php webservice,我在服务器上创建了一个自签名证书来测试它,并将客户端配置为使用这个证书,但是有一个例外出现并告诉我我还需要通过客户端证书。
其实我只是想保护传输的消息,我不需要对客户端进行身份验证,那我怎么能禁用客户端身份验证。
我正在使用带有 clientCredentialType“Certificate”和 .Net 3.5 的安全模型“Transport”。
提前感谢您的意见..
更新
正如我所提到的,我不需要服务来验证客户端的身份,所以我使用Transport Security with an Anonymous Client而不是Transport Security With Certificate Authentication,以下是客户端配置:
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="bindingName" closeTimeout="00:0:04"
openTimeout="00:00:04" receiveTimeout="00:00:04" sendTimeout="00:00:04"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
messageEncoding="Text" textEncoding="utf-8"
useDefaultWebProxy="true">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647">
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="https://myServer/myApp/myWebService"
binding="wsHttpBinding" bindingConfiguration="bindingName"
contract="xx.yy" name="zz">
</endpoint>
</client>
现在的问题是:当我调用服务时出现超时错误“对 {My Service URL} 的 HTTP 请求已超出分配的超时”。
附加信息:该服务在 HTTP 上运行良好,问题仅在我移动到 HTTPS 时出现,如果我通过 Internet 浏览器打开它,我可以看到服务 WSDL,但浏览告诉我有不安全的资源,我应该强制它显示所有资源以便查看 WSDL。
【问题讨论】:
-
看来你的问题和WPF没有关系,所以我把它转为wcf-security
标签: wcf soap ssl https wcf-security