Reputation: 703
I have set up a web role that hosts two endpoints (one HTTP and the other HTTPS). Both endpoints are pointing to the same service Main.svc
which is configured to be RESTful. This is my configuration (showing only the HTTPS one as it's the one giving me problem):
<services>
<service behaviorConfiguration="AthenaBehaviorConfigHttps" name="Athena.LEC.Service.Main">
<endpoint address="" behaviorConfiguration="AthenaBehaviorEndpointConfig"
binding="webHttpBinding" contract="Athena.LEC.Service.IMain" />
<endpoint binding="basicHttpBinding" bindingConfiguration="SecureBasic" name="basicHttpSecure" contract="Athena.LEC.Service.IMain" />
</service>
</services>
Behavior config:
<behavior name="AthenaBehaviorConfigHttps">
<serviceMetadata httpsGetEnabled="true" httpsGetUrl="" httpGetEnabled="true" httpGetUrl="" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
Basic http binding:
<basicHttpBinding>
<binding name="SecureBasic">
<security mode="Transport" />
</binding>
</basicHttpBinding>
On the Azure web role configuration:
<Sites>
<Site name="Web">
<Bindings>
<Binding name="Endpoint1" endpointName="HttpEndpoint" />
<Binding name="Endpoint2" endpointName="HttpsEndpoint" />
</Bindings>
</Site>
</Sites>
<Endpoints>
<InputEndpoint name="HttpEndpoint" protocol="http" port="7902" />
<InputEndpoint name="HttpsEndpoint" protocol="https" port="7955" />
</Endpoints>
On HTTP I have verified that the restful call was successful. However, on port 7955 (configured as Https), when I use my browser to make a call it just resulted in an empty page (normally the JSON result will be returned). Is this normal? Or am I configuring something wrongly? Thanks!
Upvotes: 0
Views: 573
Reputation: 11246
Change your binding to use basicHttp*s*Binding instead. I show how to secure WCF endpoints for http and tcp in this post. So, you can use it as a reference to check against your solution.
Upvotes: 1