开发者

WCF Test client not loading the Service

Recently I developed a wcf service. It开发者_Go百科 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>


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜