2

私は2つのサービスを持つサーバーを持っています:

  1. ContactServiceIContactService_
  2. SessionServiceISessionService

実行時にエラーが発生しました:

「Impossible de trouver un élément de point de terminaison par défaut qui fait référence au contrat 'SessionServiceReference.ISessionService' dans la section de configuration du client ServiceModel. Ceci peut être dû au fait que le fichier de configuration de votre application est introuvable ou que l 'élément de point de terminaison コレスポンデント à ce contrat est introuvable dans l'élément client."

私の web.config :

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

  <system.web>
    <authentication mode="Windows"/>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <bindings>
      <customBinding>
        <binding name="InstantMessagingBinding" closeTimeout="00:10:00">
          <textMessageEncoding>
            <readerQuotas maxStringContentLength="200000" maxArrayLength="200000" />
          </textMessageEncoding>
          <httpTransport keepAliveEnabled="false" maxReceivedMessageSize="200000" authenticationScheme="Ntlm"/>
        </binding>
      </customBinding>
    </bindings>
    <behaviors>
        <serviceBehaviors>
            <behavior name="InstantMessagingBehavior">
                <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
            <behavior name="">
                <serviceMetadata httpGetEnabled="true" />
                <serviceDebug includeExceptionDetailInFaults="false" />
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <services>
      <service name="Isima.InstantMessaging.WcfService.ContactService" behaviorConfiguration="InstantMessagingBehavior">
        <endpoint address=""
          binding="customBinding" bindingConfiguration="InstantMessagingBinding"
          contract="Isima.InstantMessaging.WcfService.IContactService" >
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
      </service>
      <service name="Isima.InstantMessaging.WcfService.SessionService" behaviorConfiguration="InstantMessagingBehavior">
        <endpoint address=""
          binding="customBinding" bindingConfiguration="InstantMessagingBinding"
          contract="Isima.InstantMessaging.WcfService.ISessionService" >
          <identity>
            <dns value="localhost" />
          </identity>
        </endpoint>
      </service>
    </services>
  </system.serviceModel>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>

</configuration>

および app.config

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
    <bindings>
      <customBinding>
        <binding name="CustomBinding_IContactService">
          <textMessageEncoding />
          <httpTransport authenticationScheme="Ntlm" />
        </binding>
        <binding name="CustomBinding_ISessionService">
          <textMessageEncoding />
          <httpTransport authenticationScheme="Ntlm" />
        </binding>
      </customBinding>
    </bindings>
    <client>
      <endpoint address="http://localhost:2984/ContactService.svc"
        binding="customBinding" bindingConfiguration="CustomBinding_IContactService"
        contract="ContactServiceReference.IContactService" name="CustomBinding_IContactService">
        <identity>
          <dns value="localhost" />
        </identity>
      </endpoint>
      <endpoint address="http://localhost:2984/SessionService.svc"
        binding="customBinding" bindingConfiguration="CustomBinding_ISessionService"
        contract="SessionServiceReference.ISessionService" name="CustomBinding_ISessionService">
        <identity>
          <dns value="localhost" />
        </identity>
      </endpoint>
    </client>
  </system.serviceModel>
</configuration>

なぜこのエラーですか?

4

0 に答える 0