के बाद नेट टीसीपी बाध्यकारी टाइमआउट के साथ डब्ल्यूसीएफ कॉलबैक सेवा मैं डब्ल्यूसीएफ (कॉलबैक अनुबंध का उपयोग करके) और नेट टीसीपी बाइंडिंग के साथ चैट एप्लिकेशन बना रहा हूं। मैं क्लाइंट एप्लिकेशन के माध्यम से एक सेवा के रूप में सेवा की मेजबानी कर रहा हूं और इसे अन्य कंप्यूटरों से तक एक्सेस कर रहा हूं।10 मिनट
समस्या जो मुझे अब सामना कर रही है वह है 10 मिनट के बाद क्लाइंट कनेक्शन एक दोष स्थिति में आता है जो कुछ प्रकार का टाइमआउट होता है। मैंने पहले ही प्राप्त समय समाप्ति बढ़ाने और सेवा और ग्राहक दोनों में टाइमआउट भेजने की कोशिश की लेकिन काम नहीं किया।
इस समय समाप्ति अवधि और किस एप्लिकेशन, सेवा या ग्राहक में वृद्धि करने के लिए मुझे किस सेटिंग में बदलाव करना चाहिए?
के बाद मेरी विन्यास फाइल,
सेवा
<system.serviceModel>
<services>
<service behaviorConfiguration="PeerTalk.Service.ChatServiceBehavior"
name="PeerTalk.Service.ChatService">
<endpoint address="" binding="netTcpBinding" bindingConfiguration=""
contract="PeerTalk.Service.ServiceContracts.IChat">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:7920/ChatService" />
<add baseAddress="net.tcp://localhost:7921/ChatService" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="PeerTalk.Service.ChatServiceBehavior">
<serviceMetadata httpGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<netTcpBinding>
<binding name="tcpBinding"
maxBufferSize="67108864"
maxReceivedMessageSize="67108864"
maxBufferPoolSize="67108864"
transferMode="Buffered"
closeTimeout="00:01:00"
openTimeout="00:01:00"
receiveTimeout="00:00:10"
sendTimeout="00:00:10"
maxConnections="100">
<readerQuotas maxDepth="64"
maxStringContentLength="67108864"
maxArrayLength="67108864"
maxBytesPerRead="67108864"
maxNameTableCharCount="16384"/>
<security mode="Transport">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows"/>
</security>
<reliableSession enabled="false" inactivityTimeout="00:01:00"/>
</binding>
</netTcpBinding>
</bindings>
</system.serviceModel>
ग्राहक
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="NetTcpBinding_IChat" closeTimeout="00:01:00" openTimeout="00:01:00"
receiveTimeout="00:10:00" sendTimeout="00:00:10" transactionFlow="false"
transferMode="Buffered" transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" listenBacklog="10" maxBufferPoolSize="67108864"
maxBufferSize="67108864" maxConnections="10" maxReceivedMessageSize="67108864">
<readerQuotas maxDepth="32" maxStringContentLength="67108864"
maxArrayLength="67108864" maxBytesPerRead="67108864" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:01:00"
enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Windows" protectionLevel="EncryptAndSign" />
<message clientCredentialType="Windows" />
</security>
</binding>
</netTcpBinding>
</bindings>
<client>
<endpoint address="net.tcp://10.10.10.45:7921/ChatService" binding="netTcpBinding"
bindingConfiguration="NetTcpBinding_IChat" contract="PeerTalkService.IChat"
name="NetTcpBinding_IChat">
</endpoint>
</client>
</system.serviceModel>
धन्यवाद कर रहे हैं।
आप -1 receiveTimeout स्थापित करने की कोशिश की है। http://msdn.microsoft.com/en-us/library/ms824661.aspx। अनंतता कहा जाता है –
इसे भी आजमाएं http://nogeekhere.blogspot.com/2009/04/why-will-wcf-client-be-disconnected.html –
धन्यवाद शोएब, मैंने अनंत का उपयोग करने की कोशिश की लेकिन वैध के रूप में स्वीकार नहीं किया कॉन्फ़िगरेशन फ़ाइल में मान। इसके लिए कोई कारण? किसी भी तरह से, मैंने एक छोटा सा कामकाज किया ताकि सेवा हर 5 मिनट में प्रत्येक ग्राहक को ताज़ा कर दे। लेकिन मुझे लगता है कि विन्यास के माध्यम से इसे संभालने का एक तरीका होना चाहिए। – user501579