REST / SOAP endpoints for a WCF service

You can expose the service in two different endpoints. the SOAP one can use the binding that support SOAP e.g. basicHttpBinding, the RESTful one can use the webHttpBinding. I assume your REST service will be in JSON, in that case, you need to configure the two endpoints with the following behaviour configuration <endpointBehaviors> <behavior name=”jsonBehavior”> … Read more

How to turn on WCF tracing?

The following configuration taken from MSDN can be applied to enable tracing on your WCF service. <configuration> <system.diagnostics> <sources> <source name=”System.ServiceModel” switchValue=”Information, ActivityTracing” propagateActivity=”true” > <listeners> <add name=”xml”/> </listeners> </source> <source name=”System.ServiceModel.MessageLogging”> <listeners> <add name=”xml”/> </listeners> </source> <source name=”myUserTraceSource” switchValue=”Information, ActivityTracing”> <listeners> <add name=”xml”/> </listeners> </source> </sources> <sharedListeners> <add name=”xml” type=”System.Diagnostics.XmlWriterTraceListener” initializeData=”Error.svclog” /> </sharedListeners> </system.diagnostics> … Read more