Scenario
I have an application for windows forms. I want to use two different WCF services that are in no way connected. HOWEVER, I'm not sure how to define a service definition in the APP.CONFIG file. From what I read, you can do what I did below, but I can’t be sure that the syntax is correct or that all tags are present where necessary, and I need some clarification.
Question.
So, how to properly install two services in SINGLE APP.CONFIG FILE? I.e:
<configuration>
<system.serviceModel>
<services>
<service>
<endpoint>
</endpoint>
<binding>
</binding>
</service>
<service>
<endpoint>
</endpoint>
<binding>
</binding>
</service>
</services>
</system.serviceModel>
</configuration>
CODE
<configuration>
<system.serviceModel>
<services>
<service>
<endpoint
address=""
binding="netTcpBinding"
bindingConfiguration="tcpServiceEndPoint"
contract="ListenerService.IListenerService"
name="tcpServiceEndPoint"
/>
<binding
name="tcpServiceEndPoint"
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"
>
<readerQuotas
maxDepth="32"
maxStringContentLength="8192"
maxArrayLength="16384"
maxBytesPerRead="4096"
maxNameTableCharCount="16384"
/>
<reliableSession
ordered="true"
inactivityTimeout="00:05:00"
enabled="true"
/>
<security mode="None">
<transport
clientCredentialType="Windows"
protectionLevel="EncryptAndSign"
/>
<message clientCredentialType="Windows" />
</security>
</binding>
</service>
<service>
<endpoint
address=""
binding="netTcpBinding"
contract="UploadObjects.IResponseService"
bindingConfiguration="TransactedBinding"
name="UploadObjects.ResponseService"
/>
<binding name="TransactedBinding">
<security mode="None" />
</binding>
</service>
</services>
</system.serviceModel>
</configuration>
EDIT
What are BEHAVIOR? How do they relate to service definitions?
EDIT 2
Should the service name be the same as the binding name?
source
share