【发布时间】:2014-03-13 18:54:11
【问题描述】:
我们的 azure Web 应用程序已经将 https 端口 443 与我们的站点证书一起使用,我们在此 webrole 中有一个 WCF 服务,该服务有一个使用我们的证书进行身份验证的 https 端点(单向 ssl),同样的服务需要一个额外的 https 端点使用我们的证书和第三方的证书支持 2-way auth。我们已经上传了证书,更新了服务定义文件,并添加了一个我们希望能够工作的端点,但在测试中我们得到了错误:服务“SslRequireCert”的 SSL 设置与 IIS 的“无”不匹配'。
所以有效的端点是:https://environemnt.application.com/Services/Service.svc 产生错误的端点:https://environment.application.com/Services/Service.svc/twa
关键要求是https,端口443,在上面的新端点,不改变角色其余部分的SSL行为,我看到条目改变IIS配置或使用角色编辑器添加一个Https Input 端点,但由于我们已经在端口 443 上使用我们的站点证书有一个 Https Input 端点,我不想改变/影响整个角色。
如果有帮助,该服务是 WCF 服务,它使用 Mtom 编码的 soap 1.2 消息
这是我们输入的新值,我还需要什么?
<behaviors>
<serviceBehaviors>
<behavior name="SSLServiceBehavior">
<serviceMetadata httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="OneWayAuthEndpointBehavior">
</behavior>
<behavior name="TwoWayAuthEndpointBehavior">
<endpointDiscovery enabled="true"></endpointDiscovery>
<clientCredentials>
<clientCertificate findValue="thumprint..." storeLocation="LocalMachine" storeName="CertificateAuthority" x509FindType="FindByThumbprint" />
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="SSLServiceBehavior" name="Service">
<endpoint address="" behaviorConfiguration="OneWayAuthEndpointBehavior"binding="wsHttpBinding" bindingConfiguration="HttpsMtomOneWay" contract="ITestService" />
<endpoint address="twa" behaviorConfiguration="TwoWayAuthEndpointBehavior" binding="wsHttpBinding" bindingConfiguration="HttpsMtomTwoWay" contract="ITestService"/>
</services>
<bindings>
<wsHttpBinding>
<binding name="HttpsMtomOneWay" messageEncoding="Mtom">
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
<binding name="HttpsMtomTwoWay" messageEncoding="Mtom">
<security mode="Transport">
<transport clientCredentialType="Certificate" />
</security>
</binding>
</wsHttpBinding>
</bindings>
非常感谢
【问题讨论】:
标签: c# web-services wcf azure ssl