为什么我不能让我的Azure,WCF,REST,SSL项目的工作?我究竟做错了什么? [英] Why can't I get my Azure, WCF, REST, SSL project working? What am I doing wrong?
问题描述
我试图让Azure的SSL下,WCF和REST,但网页甚至不会加载。
下面是我遵循的步骤:
1)我映射www.mydomain.com CNAME我azuresite.cloudapp.net
2)我采购的www.mydomain.com SSL证书,并适当在我azuresite.cloudapp.net安装了托管服务的项目
3)我部署我的WCF REST服务,Azure和动手的。下面是我的web.config配置。
的HTTP(非HTTPS)效力之版本工作正常。我的服务网址,HTTP://www.mydomain的.com / service.svc /会话的工作就好了。
。当我部署与下面的web.config中的项目,启用SSL,HTTPS://www.mydomain的.com / service.svc /会话甚至不拉根本上
我在做什么错了?
< system.serviceModel>
<服务和GT;
<服务名称=服务>
<! - 非HTTPS工作就好了 - >
<! -
<端点地址=绑定=的WebHttpBinding合同=IServicebehaviorConfiguration =RestFriendly>
< /端点>
- >
<! - 这是不行的,我究竟做错了什么? - >
<端点地址=绑定=的WebHttpBindingbindingConfiguration =TransportSecurity合同=IServicebehaviorConfiguration =RestFriendly>
< /端点>
< /服务>
< /服务> <&行为GT;
< endpointBehaviors>
<行为NAME =RestFriendly>
< webHttp>< / webHttp>
< /行为>
< / endpointBehaviors>
< /行为> <&绑定GT;
<&的WebHttpBinding GT;
<绑定名称=TransportSecurity>
<安全模式=运输>
<运输clientCredentialType =无/>
< /安全>
< /&结合GT;
< /&的WebHttpBinding GT;
< /绑定>
< /system.serviceModel>
你在ServiceDefinition.csdef中文件中添加HTTPS端点到您的Web角色?
它应该是这个样子:
< WebRole NAME =WebRole>
< InputEndpoints>
< InputEndpoint NAME =HttpIn协议=HTTP端口=80/>
< InputEndpoint NAME =HttpsIn协议=https开头端口=443/>
< / InputEndpoints>
< / WebRole>
请参阅的http://blogs.msdn.com/jnak/archive/2009/05/12/https-endpoint-on-windows-azure.aspx获取更多信息。
I'm trying to get SSL, WCF and REST under Azure, but the page won't even load.
Here are the steps I followed:
1) I mapped the www.mydomain.com CNAME to my azuresite.cloudapp.net
2) I procured an SSL certificate for www.mydomain.com and properly installed it at my azuresite.cloudapp.net hosted service project
3) I deployed my WCF REST service to Azure and started it. Below is my web.config configuration.
The http (non-https) binding version worked correctly. My service URL, http: //www.mydomain .com/service.svc/sessions worked just fine.
When I deployed the project with the web.config below, enabling SSL, https: //www.mydomain .com/service.svc/sessions does not even pull up at all.
What am I doing wrong?
<system.serviceModel>
<services>
<service name="Service">
<!-- non-https worked just fine -->
<!--
<endpoint address="" binding="webHttpBinding" contract="IService" behaviorConfiguration="RestFriendly">
</endpoint>
-->
<!-- This does not work, what am I doing wrong? -->
<endpoint address="" binding="webHttpBinding" bindingConfiguration="TransportSecurity" contract="IService" behaviorConfiguration="RestFriendly">
</endpoint>
</service>
</services>
<behaviors>
<endpointBehaviors>
<behavior name="RestFriendly">
<webHttp></webHttp>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<webHttpBinding>
<binding name="TransportSecurity">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
</webHttpBinding>
</bindings>
</system.serviceModel>
Did you add the https endpoint to your web role in the ServiceDefinition.csdef file?
It should look something like this:
<WebRole name="WebRole">
<InputEndpoints>
<InputEndpoint name="HttpIn" protocol="http" port="80" />
<InputEndpoint name="HttpsIn" protocol="https" port="443" />
</InputEndpoints>
</WebRole>
See http://blogs.msdn.com/jnak/archive/2009/05/12/https-endpoint-on-windows-azure.aspx for more info.
这篇关于为什么我不能让我的Azure,WCF,REST,SSL项目的工作?我究竟做错了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!