La configuration de la WCF pour wsHttpBinding

J'ai un service WCF qui fonctionne à l'aide basicHttpBinding, je suis en train de le configurer pour aller sur https et d'authentifier auprès d'un fournisseur d'appartenances SQL, et pour ce faire, je suis en train de le convertir à utiliser wsHttpBinding.

Cependant, avec la mise à jour de config je reçois le message d'erreur suivant lorsque j'essaie de me connecter avec le client:

Ne pouvait pas trouver de point de terminaison par défaut de l'élément que les références du contrat " KFileService.IKFileWcfService " dans le ServiceModel section de configuration de client. Ce pourrait être parce que le fichier de configuration n'a été trouvé pour votre application, ou parce qu'aucun d'extrémité de l'élément correspondant à ce contrat peut être trouvé dans le client de l'élément.

Voici la partie pertinente de la web.config pour le serveur:

<system.serviceModel>
    <protocolMapping>
      <remove scheme="http" />
      <add scheme="https" binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_IKFileWcfServiceBinding" />
    </protocolMapping>
    <behaviors>
      <serviceBehaviors>
        <behavior name="KFileWcfServiceBehavior">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
          <dataContractSerializer maxItemsInObjectGraph="2147483646" />
          <serviceCredentials>
            <userNameAuthentication userNamePasswordValidationMode="MembershipProvider"
              membershipProviderName="SqlMembershipProvider" />
          </serviceCredentials>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service behaviorConfiguration="KFileWcfServiceBehavior" name="KFileWcfService">
        <endpoint address="https://localhost:36492/KFileWcfService.svc"
          binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_IKFileWcfServiceBinding"
          name="wsHttpBinding_IKFileWcfService" bindingName="wsHttpBinding_IKFileWcfServiceBinding"
          contract="KFileWcfService.IKFileWcfService">
          <identity>
            <certificateReference storeLocation="CurrentUser" />
          </identity>
        </endpoint>
      </service>
    </services>
    <serviceHostingEnvironment minFreeMemoryPercentageToActivateService="0" multipleSiteBindingsEnabled="true"/>
    <bindings>
      <wsHttpBinding>
        <binding name="wsHttpBinding_IKFileWcfServiceBinding" maxBufferPoolSize="2147483647"
          maxReceivedMessageSize="2147483647">
          <readerQuotas maxDepth="32" maxStringContentLength="100000" maxArrayLength="2147483647"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <security mode="Message">
          </security>
        </binding>
      </wsHttpBinding>
    </bindings>
</system.serviceModel>

Et voici le côté client:

  <system.serviceModel>
    <bindings>
      <wsHttpBinding>
        <binding name="wsHttpBinding_IKFileWcfService" />
      </wsHttpBinding>
    </bindings>
    <client>
      <endpoint address="https://localhost:36492/KFileWcfService.svc"
        binding="wsHttpBinding" bindingConfiguration="wsHttpBinding_IKFileWcfService"
        contract="KFileWcfService.IKFileWcfService" name="wsHttpBinding_IKFileWcfService" />
    </client>
  </system.serviceModel>

J'ai fait de mon mieux pour passer par toutes les questions et les exemples déjà, mais je n'ai pas eu de chance. Quelqu'un peut me dire ce que je fais mal?

Edit:

Pour plus de renseignements, voici le côté serveur de configuration qui fonctionne avec basicHttpBinding:

  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the value 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" />
          <dataContractSerializer maxItemsInObjectGraph="2147483646" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <services>
      <service name="KFileWcfService">
        <endpoint address="https://localhost:36492/KFileWcfService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IKFileWcfService" contract="KFileService.IKFileWcfService" name="BasicHttpBinding_IKFileWcfService" />
      </service>
    </services>
    <serviceHostingEnvironment minFreeMemoryPercentageToActivateService="0" multipleSiteBindingsEnabled="true"/>
    <bindings>
      <basicHttpBinding>
        <binding name="BasicHttpBinding_IKFileWcfService" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" transferMode="Streamed">
          <readerQuotas maxDepth="32" maxStringContentLength="100000" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />
        </binding>
      </basicHttpBinding>
    </bindings>
</system.serviceModel>

Et client:

<system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IKFileWcfService" />
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="https://localhost:36492/KFileWcfService.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IKFileWcfService"
                contract="KFileService.IKFileWcfService" name="BasicHttpBinding_IKFileWcfService" />
        </client>
    </system.serviceModel>
peut-être montrer votre ancien basicHttpBinding pour nous.
A ajouté que la question.

OriginalL'auteur Eric | 2013-08-07