WCF SDK Question:
Download Job Interview Questions and Answers PDF
How to configure Reliability while communicating with WCF Services?
Answer:
Reliability can be configured in the client config file by adding reliableSession under binding tag.
<system.serviceModel>
<services>
<service name = "MyService">
<endpoint
address = "net.tcp://localhost:8888/MyService" binding = "netTcpBinding"
bindingConfiguration = "ReliableCommunication" contract = "IMyContract"
/>
</service>
</services>
<bindings>
<netTcpBinding>
<binding name = "ReliableCommunication">
<reliableSession enabled = "true"/>
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
Reliability is supported by following bindings only
NetTcpBinding
WSHttpBinding
WSFederationHttpBinding
WSDualHttpBinding
<system.serviceModel>
<services>
<service name = "MyService">
<endpoint
address = "net.tcp://localhost:8888/MyService" binding = "netTcpBinding"
bindingConfiguration = "ReliableCommunication" contract = "IMyContract"
/>
</service>
</services>
<bindings>
<netTcpBinding>
<binding name = "ReliableCommunication">
<reliableSession enabled = "true"/>
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
Reliability is supported by following bindings only
NetTcpBinding
WSHttpBinding
WSFederationHttpBinding
WSDualHttpBinding
Download WCF SDK Interview Questions And Answers
PDF
Previous Question | Next Question |
What is Transport and Message Reliability? | How to set the timeout property for the WCF Service client call? |