[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

Re: wcf call timeout

Rajesh Kumar Chekuri

3/22/2011 6:47:00 AM

This ll help u

<bindings>
<netTcpBinding>
<binding name="ECMSBindingConfig" closeTimeout="00:10:00" openTimeout="00:10:00"
sendTimeout="00:10:00" maxBufferPoolSize="2147483647" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647" portSharingEnabled="true">
<readerQuotas maxArrayLength="2147483647" maxNameTableCharCount="2147483647"
maxStringContentLength="2147483647" maxDepth="2147483647"
maxBytesPerRead="2147483647" />
<security mode="None" />
</binding>
</netTcpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="ECMSServiceBehavior">
<dataContractSerializer ignoreExtensionDataObject="true" maxItemsInObjectGraph="2147483647" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceTimeouts transactionTimeout="00:10:00" />
<serviceThrottling maxConcurrentCalls="200" maxConcurrentSessions="100"
maxConcurrentInstances="100" />
</behavior>
</serviceBehaviors>
</behaviors>

> On Thursday, February 28, 2008 1:19 PM Ro wrote:

> I have a client calling into a wcf service and get the following message:
>
> This request operation sent to net.tcp://localhost:9992/MyService did not
> receive a reply within the configured timeout (00:01:00). The time allotted
> to this operation may have been a portion of a longer timeout. This may be
> because the service is still processing the operation or because the service
> was unable to send a reply message. Please consider increasing the operation
> timeout (by casting the channel/proxy to IContextChannel and setting the
> OperationTimeout property) and ensure that the service is able to connect to
> the client.
>
> If the return value become smaller, I don't get the above error.
> What is the reason for it and how to resolve it?


>> On Thursday, February 28, 2008 11:09 PM Ro wrote:

>> What are the key words for the elements? Are they client side or service side?
>> Any examples?
>>
>> "Michael Nemtsev [MVP]" wrote:


>>> On Saturday, March 01, 2008 2:16 PM Michael Nemtsev [MVP] wrote:

>>> Hello Roy,
>>>
>>> increase timeouts settings (open/close/receive/send) in your <binding> element
>>>
>>> ---
>>> WBR,
>>> Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.c...
>>>
>>> "The greatest danger for most of us is not that our aim is too high and we
>>> miss it, but that it is too low and we reach it" (c) Michelangelo
>>>
>>>
>>> R> I have a client calling into a wcf service and get the following
>>> R> message:
>>> R>
>>> R> This request operation sent to net.tcp://localhost:9992/MyService did
>>> R> not receive a reply within the configured timeout (00:01:00). The
>>> R> time allotted to this operation may have been a portion of a longer
>>> R> timeout. This may be because the service is still processing the
>>> R> operation or because the service was unable to send a reply message.
>>> R> Please consider increasing the operation timeout (by casting the
>>> R> channel/proxy to IContextChannel and setting the OperationTimeout
>>> R> property) and ensure that the service is able to connect to the
>>> R> client.
>>> R>
>>> R> If the return value become smaller, I don't get the above error. What
>>> R> is the reason for it and how to resolve it?
>>> R>


>>>> On Saturday, March 01, 2008 11:15 PM Ro wrote:

>>>> Michael,
>>>> I tried to increase the open/close/send/receive timeout on both the client
>>>> and service side and it does not work. The error message still complains the
>>>> "configured timeout (00:01:00)" even though I set them longer than that.
>>>> I found the service actually received the call add returned the value. If
>>>> the message is small, the client will get the reply immediately. However, if
>>>> I increased the message to a certain size (I tried to increase the size), the
>>>> client will no longer get it and experience a timeout. My guess is the size
>>>> of the message might caused the problem. Any idea to correct it?
>>>> Thanks.
>>>> Roy
>>>>
>>>> "Michael Nemtsev [MVP]" wrote:


>>>>> On Sunday, March 02, 2008 1:36 AM Ro wrote:

>>>>> I enabled tracing. On the service side, I got
>>>>>
>>>>> <Exception><ExceptionType>System.ServiceModel.CommunicationException,
>>>>> System.ServiceModel, Version=3.0.0.0, Culture=neutral,
>>>>> PublicKeyToken=b77a5c561934e089</ExceptionType><Message>The socket connection
>>>>> was aborted. This could be caused by an error processing your message or a
>>>>> receive timeout being exceeded by the remote host, or an underlying network
>>>>> resource issue. Local socket timeout was '00:01:00'.</Message><StackTrace>
>>>>> at System.ServiceModel.Channels.SocketConnection.Write(Byte[] buffer, Int32
>>>>> offset, Int32 size, Boolean immediate, TimeSpan timeout)
>>>>> at System.ServiceModel.Channels.SocketConnection.Write(Byte[] buffer,
>>>>> Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout, BufferManager
>>>>> bufferManager).....
>>>>>
>>>>> On client side, I got
>>>>> <ExceptionString>System.ServiceModel.CommunicationException: The maximum
>>>>> message size quota for incoming messages (65536) has been exceeded. To
>>>>> increase the quota, use the MaxReceivedMessageSize property on the
>>>>> appropriate binding element. --->
>>>>> System.ServiceModel.QuotaExceededException: The maximum message size quota
>>>>> for incoming messages (65536) has been exceeded. To increase the quota, use
>>>>> the MaxReceivedMessageSize property on the appropriate binding element.
>>>>> --- End of inner exception stack trace
>>>>> ---</ExceptionString><InnerException><ExceptionType>System.ServiceModel.QuotaExceededException,
>>>>> System.ServiceModel, Version=3.0.0.0, Culture=neutral,
>>>>> PublicKeyToken=b77a5c561934e089</ExceptionType><Message>The maximum message
>>>>> size quota for incoming messages (65536) has been exceeded. To increase the
>>>>> quota, use the MaxReceivedMessageSize property on the appropriate binding
>>>>> element.</Message><StackTrace> at
>>>>> System.ServiceModel.Channels.ClientDuplexConnectionReader.DecodeMessage(Byte[]
>>>>> buffer, Int32& offset, Int32& size, Boolean& isAtEOF, TimeSpan
>>>>> timeout)
>>>>> at
>>>>> System.ServiceModel.Channels.SessionConnectionReader.DecodeMessage(TimeSpan
>>>>> timeout)
>>>>> at
>>>>> System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object state)
>>>>> at System.ServiceModel.Channels.SocketConnection.FinishRead()
>>>>> at
>>>>> System.ServiceModel.Channels.SocketConnection.AsyncReadCallback(Boolean
>>>>> haveResult, Int32 error, Int32 bytesRead)....
>>>>>
>>>>>
>>>>> I increased maxReceivedMessageSize. But it still not work. Any ideas?


>>>>>> On Thursday, May 22, 2008 3:21 PM Noa wrote:

>>>>>> I've run into this same issue. Has anyone found a solution to this? I've
>>>>>> tried increasing message sizes, changing up the config files, and a number of
>>>>>> other things, but I consistently get the same issue.