2014-12-17 5 views
0
<?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 

Проверка клиента ранее, но теперь я не могу просмотреть какой-либо метод в тестовом клиенте. IsMy TestClient не может отображать методы

что-то не так в конфигурации?

Вышеуказанный файл web.config моего приложения. Посмотрите пожалуйста.

Он ничего не отображает. Я не знаю, что пошло не так.

ответ

0

Got it. Отредактируйте конечные точки и заставьте их работать.