Question

I develop a WCF service (3.5) in VS 2010. Generally I am able to test it via the WCF Test Client and call the service from any browser. I'm on my Windows 7 development machine, so everything is default. The address is like http://localhost:54538/MyService.svc

However, when I try to call the service from a third party client (which in the end is my target), the client gets no response at all. The response is just empty. I also tried to call the service by PHP curl from a local Apache webserver - also an empty response.

So I think there might be a problem with the configuration. The services part is:

<services>
  <service behaviorConfiguration="MyNamespace.Service1Behavior" name="MyNamespace.MyService">
      <endpoint address="" binding="wsHttpBinding" contract="MyNamespace.IMyService">
          <identity>
              <dns value="localhost" />
          </identity>
      </endpoint>
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
</services>

Do I have to add an endpoint or change anything else?

Was it helpful?

Solution

So the solution I found (based on @marc_s' comment) is adding another endpoint as webHttpBinding:

<endpoint address="rest" binding="webHttpBinding" contract="MyNamespace.IMyCometService" bindingConfiguration="UnsecuredWeb">
    <identity>
        <dns value="localhost"/>
    </identity>
</endpoint>

Then calling the service from the third party software via http://localhost:54538/MyService.svc/rest

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top