vendredi 22 juin 2018

Endpoint not found. WCF C#

I have created a WCF web service and there are some methods written in that service. When i right click on that service and "view in browser" and call service method http://localhost:8265/CRMService.svc/GetPricelist then i get this error. Below is my web.config file. Require help

 <system.serviceModel>
    <behaviors>
      <!--<endpointBehaviors>
        <behavior name="restfulbehavior">
          <webHttp />-->
      <!--defaultBodyStyle="WrappedRequest" automaticFormatSelectionEnabled="false"/>-->
      <!--
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior>
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="true"/>
        </behavior>
      </serviceBehaviors>-->
      <serviceBehaviors>
        <behavior name="">
          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="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"/>
          <!--<serviceAuthorization serviceAuthorizationManagerType="WCFZKTecoService.Authorization.RestAuthorizationManager, WCFZKTecoService"/>-->
        </behavior>
      </serviceBehaviors>
      <endpointBehaviors>
        <behavior name="restfulbehavior">
          <webHttp/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <services>
      <service name="Procons.Sodamco.SalesForceWCF.CRMService" behaviorConfiguration="">

        <endpoint address="" binding="webHttpBinding" behaviorConfiguration="restfulbehavior" name="RESTEndpoint" contract="Procons.Sodamco.SalesForceWCF.ICRMService"/>
      </service>
    </services>
    <protocolMapping>

      <add binding="webHttpBinding" scheme="https" />
    </protocolMapping>
    <!--<bindings>
      <webHttpBinding>
        <binding name="webHttpBinding_ICRMService" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647">
          <security mode="None" />
        </binding>
      </webHttpBinding>
    </bindings>-->
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" minFreeMemoryPercentageToActivateService="1" multipleSiteBindingsEnabled="true"/>
  </system.serviceModel>




Aucun commentaire:

Enregistrer un commentaire