【发布时间】:2010-10-10 21:55:30
【问题描述】:
请发布您为设置 SSL 以在 Azure 上使用 WCF 所采取的步骤。
我的 valid certificate uploaded 成功 (using cspack) 并与站点的其余部分一起工作,但在添加它之后,我以前工作的 WCF 服务停止工作。 (我得到的只是返回给 Silverlight 的 404 错误,这不是很有帮助。投票给提出更好日志记录的人,我也可以这样做以帮助诊断问题!)
我在这个配置上尝试了很多变体:
<system.serviceModel>
<!--start added for SSL-->
<bindings>
<basicHttpBinding>
<binding name="SecureBasicHttpBinding">
<security mode="Transport">
<transport clientCredentialType="None" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<!--end added for SSL-->
<behaviors>
<!--start added for SSL-->
<endpointBehaviors>
<behavior name="DisableServiceCertificateValidation">
<clientCredentials>
<serviceCertificate>
<authentication certificateValidationMode="None"
revocationMode="NoCheck" />
</serviceCertificate>
</clientCredentials>
</behavior>
</endpointBehaviors>
<!--start added for SSL-->
<serviceBehaviors>
<behavior name="Silverheat.Cloud_WebRole.API.DataServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<!-- certificate checking removed -->
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
<services>
<service behaviorConfiguration="Silverheat.Cloud_WebRole.API.DataServiceBehavior"
name="Silverheat.Cloud_WebRole.API.DataService">
<!--<endpoint address="" binding="basicHttpBinding" contract="Silverheat.Cloud_WebRole.API.DataService" />-->
<endpoint bindingConfiguration="SecureBasicHttpBinding"
behaviorConfiguration="DisableServiceCertificateValidation"
address="" binding="basicHttpBinding"
contract="Silverheat.Cloud_WebRole.API.DataService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
不幸的是,调试这个并获取更多信息真的很难,因为我无法像在实时服务器上使用的那样远程调试和调试任何配置,因为bindings tag has problems 正在调试(但不是实时)。
感谢您的帮助和关注!
【问题讨论】: