Why can't I start an Azure, WCF, REST, SSL project? What am I doing wrong?

I am trying to get SSL, WCF and REST under Azure, but the page does not even load.

Below are the steps that I followed:

1) I matched CNAME www.mydomain.com with my azuresite.cloudapp.net

2) I purchased an SSL certificate for www.mydomain.com and installed it correctly in my azuresite.cloudapp.net service project.

3) I deployed the WCF REST service for Azure and started it. Below is the configuration of my web.config.

The http (non-https) binding version is working correctly. My service url, http://www.mydomain.com/service.svc/sessions worked fine.

When I deployed the project using web.config below, the inclusion of SSL, https://www.mydomain.com/service.svc/sessions is not pulled 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> 
+4
source share
2 answers

Have you added 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 details.

+3
source

You may be lacking in official conduct. Try adding this:

  <serviceBehaviors> <behavior name="RestService"> <serviceMetadata httpsGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="true" /> </behavior> </serviceBehaviors> 

Then, when you define your service:

  <service behaviorConfiguration="RestService" name="WebService.Rest"> 

Edit

Another thing that may be the problem is that the request does not reach your webrole. Have you configured inputEndpoint for SSL? see http://blogs.msdn.com/b/davethompson/archive/2009/11/24/add-ssl-security-to-your-azure-webrole.aspx

+1
source

Source: https://habr.com/ru/post/1300359/


All Articles