Note that there are some explanatory texts on larger screens.

plurals
  1. POClient app.config generating duplicate endpoints [WCF]
    text
    copied!<p>I have a client that generates its app.config using a Service Reference to a NetTCPBinding over my localhost. For some reason when I run my service and Update the Service Reference on the client the app.config file duplicates the endpoints (incrementing the name) instead of replacing the current file.</p> <p>How can I stop the client app.config from duplicating the endpoints?</p> <p>Here is my service app.config:</p> <p> </p> <pre><code> &lt;services&gt; &lt;service name="Embedded_DCC_Service.EmbeddedService" behaviorConfiguration="serviceBehavior"&gt; &lt;endpoint name ="TCPEndPoint" binding="netTcpBinding" contract="Embedded_DCC_Service.IEmbeddedService" address="EmbeddedService" bindingConfiguration="EmbeddedService_Binding" /&gt; &lt;endpoint name ="MetaDataTcpEndpoint" binding="mexTcpBinding" contract="IMetadataExchange" address="mex" /&gt; &lt;host&gt; &lt;baseAddresses&gt; &lt;add baseAddress="net.tcp://localhost:9292/"/&gt; &lt;/baseAddresses&gt; &lt;/host&gt; &lt;/service&gt; &lt;/services&gt; &lt;bindings&gt; &lt;netTcpBinding&gt; &lt;binding name="EmbeddedService_Binding" closeTimeout="infinite" openTimeout="infinite" receiveTimeout="infinite" sendTimeout="infinite" /&gt; &lt;/netTcpBinding&gt; &lt;/bindings&gt; &lt;behaviors&gt; &lt;serviceBehaviors&gt; &lt;behavior name="serviceBehavior"&gt; &lt;serviceMetadata httpGetEnabled="false"/&gt; &lt;/behavior&gt; &lt;/serviceBehaviors&gt; &lt;/behaviors&gt; &lt;/system.serviceModel&gt; </code></pre> <p></p> <p>And the generated app.config on the client (with duplicate entries):</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;configuration&gt; &lt;system.serviceModel&gt; &lt;bindings&gt; &lt;netTcpBinding&gt; &lt;binding name="TCPEndPoint" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /&gt; &lt;security mode="Transport"&gt; &lt;transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"&gt; &lt;extendedProtectionPolicy policyEnforcement="Never" /&gt; &lt;/transport&gt; &lt;message clientCredentialType="Windows" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;binding name="TCPEndPoint1" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /&gt; &lt;security mode="Transport"&gt; &lt;transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"&gt; &lt;extendedProtectionPolicy policyEnforcement="Never" /&gt; &lt;/transport&gt; &lt;message clientCredentialType="Windows" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;binding name="TCPEndPoint2" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /&gt; &lt;security mode="Transport"&gt; &lt;transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"&gt; &lt;extendedProtectionPolicy policyEnforcement="Never" /&gt; &lt;/transport&gt; &lt;message clientCredentialType="Windows" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;binding name="TCPEndPoint3" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536"&gt; &lt;readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /&gt; &lt;reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" /&gt; &lt;security mode="Transport"&gt; &lt;transport clientCredentialType="Windows" protectionLevel="EncryptAndSign"&gt; &lt;extendedProtectionPolicy policyEnforcement="Never" /&gt; &lt;/transport&gt; &lt;message clientCredentialType="Windows" /&gt; &lt;/security&gt; &lt;/binding&gt; &lt;/netTcpBinding&gt; &lt;/bindings&gt; &lt;client&gt; &lt;endpoint address="net.tcp://localhost:9292/EmbeddedService" binding="netTcpBinding" bindingConfiguration="TCPEndPoint" contract="ServiceReference1.IEmbeddedService" name="TCPEndPoint"&gt; &lt;identity&gt; &lt;userPrincipalName value="user@mmi.local" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;endpoint address="net.tcp://localhost:9292/EmbeddedService" binding="netTcpBinding" bindingConfiguration="TCPEndPoint1" contract="ServiceReference1.IEmbeddedService" name="TCPEndPoint1"&gt; &lt;identity&gt; &lt;userPrincipalName value="user@mmi.local" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;endpoint address="net.tcp://localhost:9292/EmbeddedService" binding="netTcpBinding" bindingConfiguration="TCPEndPoint2" contract="ServiceReference1.IEmbeddedService" name="TCPEndPoint2"&gt; &lt;identity&gt; &lt;userPrincipalName value="user@mmi.local" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;endpoint address="net.tcp://localhost:9292/EmbeddedService" binding="netTcpBinding" bindingConfiguration="TCPEndPoint3" contract="ServiceReference1.IEmbeddedService" name="TCPEndPoint3"&gt; &lt;identity&gt; &lt;userPrincipalName value="user@mmi.local" /&gt; &lt;/identity&gt; &lt;/endpoint&gt; &lt;/client&gt; &lt;/system.serviceModel&gt; &lt;/configuration&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload