Henry
Henry

Reputation: 883

WCF Test client not loading the Service

Recently I developed a wcf service. It was working fine till yesterday . I was able to test it using VS2010 in built WCF Test client. Since Yesterday I am not able to see my service in WCF Test client. When I press F5 it opens the Wcf test client window and at the bottom it shows Servie added successfully. But it doesn't load any service. I tried to add it manually from file/add service, still it doesn't load. What could be the problem. I really appreciate your help. Here is my Web.config.


<system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true"/>
    <bindings/>
    <client/>
    <services>
      <service behaviorConfiguration="myproj.ServiceBehavior" name="myproj.Service">
        <endpoint address="" binding="webHttpBinding" contract="myproj.IService" behaviorConfiguration="REST">
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <behaviors>
      <endpointBehaviors>
        <behavior name="REST">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="myproj.ServiceBehavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>

Upvotes: 9

Views: 11187

Answers (1)

marc_s
marc_s

Reputation: 754468

You're using the webHttpBinding for a REST-style WCF service.

The WCF Test Client is a SOAP test application - it works against SOAP web services (basically anything but the webHttpBinding, in WCF).

For REST services, just browse to the service URL and invoke your REST service that way.

Upvotes: 24

Related Questions