Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF Test client not loading the Service

Tags:

wcf

c#-4.0

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>
like image 966
Henry Avatar asked Aug 26 '11 17:08

Henry


1 Answers

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.

like image 88
marc_s Avatar answered Sep 30 '22 18:09

marc_s