Service WCF app.config

Je suis le développement d'un Service WCF et je suis un peu confus sur où ses en consommant ses configurations.

J'ai une application.fichier de config dans mon application hôte (application console) et dans mon Service WCF projet (fourni avec le modèle)

Au moment de l'exécution, je peux voir que les configurations à partir de deux fichiers sont utilisés.

Comment ça fonctionne? Pourquoi la WCF bibliothèque de projet (un projet dll) contient une application.le fichier de configuration et quel est son but?

Je peux vraiment utiliser quelques précisions à ce sujet ...

Mise à jour

c'est la configuration WCF à partir de mon application.config de l'application hôte

<system.serviceModel>

    <!-- services -->
    <services>
        <service name="Services.CalcService">
            <endpoint address="net.tcp://localhost:8412/MyCalcService"
                      binding="netTcpBinding"
                      bindingConfiguration="MyNetTcpBinding"
                      contract="Contracts.ICalc"/>
        </service>
    </services>

    <!-- bindings -->
    <bindings>
        <netTcpBinding>
            <binding name="MyNetTcpBinding"
                     closeTimeout="00:01:00"
                     openTimeout="00:01:00"
                     receiveTimeout="00:10:00"
                     sendTimeout="00:01:00"
                     transactionFlow="false"
                     transferMode="Streamed"
                     transactionProtocol="OleTransactions"
                     hostNameComparisonMode="StrongWildcard"
                     listenBacklog="10"
                     maxBufferPoolSize="524288"
                     maxBufferSize="65536"
                     maxConnections="10"
                     maxReceivedMessageSize="65536">
                <readerQuotas maxDepth="32"
                              maxStringContentLength="8192"
                              maxArrayLength="16384"
                              maxBytesPerRead="4096"
                              maxNameTableCharCount="16384" />
                <reliableSession ordered="true"
                                 inactivityTimeout="00:10:00"
                                 enabled="false" />
                <security mode="Transport">
                    <transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
                </security>
            </binding>
        </netTcpBinding>
    </bindings>

</system.serviceModel>

C'est ma configuration WCF de mon service WCF bibliothèque

  <system.serviceModel>
<services>
  <service name="Services.CalcService">
    <endpoint address="" binding="basicHttpBinding" contract="Contracts.ICalc">
      <identity>
        <dns value="localhost" />
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost:8733/Design_Time_Addresses/Services/CalcService/" />
      </baseAddresses>
    </host>
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior>
      <serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/>
      <serviceDebug includeExceptionDetailInFaults="False" />
    </behavior>
  </serviceBehaviors>
</behaviors>

Grâce,
Omri.

OriginalL'auteur Omri Btian | 2013-08-15