我的TestClient无法显示方法

时间:2014-12-17 03:34:53

标签: wcf web-config wcftestclient

<?xml version="1.0"?>
<configuration>

  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5"/>
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior name ="SaadiqinWcf.SaadiqinServiceBehavior">
          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name ="jsonBehavior">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <protocolMapping>
      <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>
    <services>
      <service name="SaadiqinWcf.SaadiqinService" behaviorConfiguration="SaadiqinWcf.SaadiqinServiceBehavior">
        <endpoint behaviorConfiguration="jsonBehavior" address="./Saadiqin.svc" binding="webHttpBinding" contract="SaadiqinWcf.ISaadiqinService"/>
        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
    <!--<serviceHostingEnvironment aspNetCompatibilityEnabled="true" >
      <serviceActivations>
        <add factory="System.ServiceModel.Activation.WebServiceHostFactory"
             relativeAddress="./Saadiqin.svc"
             service="SaadiqinWcf.SaadiqinService"/>

      </serviceActivations>

    </serviceHostingEnvironment>-->


  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <httpProtocol>
      <customHeaders>
        <add name ="Access-Control-Allow-Origin" value ="*"/>
      </customHeaders>
    </httpProtocol>
    <directoryBrowse enabled="true"/>
  </system.webServer>
  <connectionStrings>
    <add name="SaadiqinEntities" connectionString="data source=*.*.*.*,****;initial catalog=******;persist security info=true;user id=***; Password=*****; multipleactiveresultsets=True;application name=EntityFramework" />
  </connectionStrings>

</configuration>

I am writing the wcf in which i have a bunch of Interfaces. I was able to test the services in 

先前测试客户端但现在我无法查看测试客户端中的任何方法。是

配置有什么问题吗?

以上是我的应用程序的web.config文件。请看一下。

它没有显示任何内容。我不知道出了什么问题。

1 个答案:

答案 0 :(得分:0)

知道了。编辑端点并使其工作。