WCF - endpoint specification - for Azure
So - I have my web service set up that is going to listen on the query side of my CQRS architecture. The idea is that the call uses REST and the parameter passed in (in the URI) can be turned into the query definition instance.
My web.config has as follows :-
Code:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<services >
<service name="QueryHandlerWCFServiceWebRole.QueryHandlerService" >
<endpoint kind="webHttpEndpoint" contract="QueryHandlerWCFServiceWebRole.IQueryHandlerService" />
</service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<routing />
</system.serviceModel>
The question is - how do I know what endpoint to use to get to that end point once it is hosted?
i.e. on the client -
Code:
<client>
<endpoint address="http://localhost:4165/QueryHandlerService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IQueryHandlerService"
contract="QueryHandlerServiceReference.IQueryHandlerService"
name="BasicHttpBinding_IQueryHandlerService" />
</client>
How do I know what to replace http://localhost:4165/QueryHandlerService.svc with?
Re: WCF - endpoint specification - for Azure
Once hosted won't you be using an HTTPS://someaddress.com/??
Re: WCF - endpoint specification - for Azure
To my knowledge your are not bound on using https unless you are passing log-transport transactions, i believe you can also use http with decryption and avoid a certificate(although seems like a pain and irrelevant here but, anyhow).
And, yes, won't you be using a real address instead of localhost?If not and the localhost is configured at the specific port then you will leave it as is. So this is a Microsoft sample for both addresses:
Code:
' <client>
' <endpoint
' name ="ServerEndpoint"
' address="http://localhost:12000/DuplexUsingConfig/Server"
' bindingConfiguration="WSDualHttpBinding_IDuplex"
' binding="wsDualHttpBinding"
' contract="IDuplex"
' />
' </client>
' <bindings>
' <wsDualHttpBinding>
' <binding
' name="WSDualHttpBinding_IDuplex"
' clientBaseAddress="http://localhost:8000/myClient/"
' />
' </wsDualHttpBinding>
' </bindings>
(bloody non code enabled quick reply @$#@#$@!#!@%@%!)
Re: WCF - endpoint specification - for Azure
Cool - I have registered a couple of domains and once they are set up I will try and load them into Azure to proceed. It looks like there is some sophisticated load balancing built into Azure so that is one less thing to worry about :-)