Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / May 2008

Tip: Looking for answers? Try searching our database.

wcf call timeout

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Roy - 28 Feb 2008 18:19 GMT
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?
Michael Nemtsev [MVP] - 28 Feb 2008 22:25 GMT
Hello Roy,

increase timeouts settings (open/close/receive/send) in your <binding> element

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"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>
Roy - 29 Feb 2008 04:09 GMT
What are the key words for the elements? Are they client side or service side?
Any examples?

> Hello Roy,
>
[quoted text clipped - 23 lines]
> R> is the reason for it and how to resolve it?
> R>
Michael Nemtsev [MVP] - 29 Feb 2008 04:36 GMT
Hello Roy,

on client side you should have the <bindings> section where u specify your
binding configuration like <basicHttpBinding> or <wsHttpBinding>
Inside that binding your have <binding name="..." > tag, and there you set
the timeouts. press Ctrl+Space inside binding tag and intelliscence shows
your the timeout attributes

---
WBR,
Michael  Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour 

"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> What are the key words for the elements? Are they client side or
R> service side? Any examples?
R>
R> "Michael Nemtsev [MVP]" wrote:
R>
>> Hello Roy,
>>
[quoted text clipped - 29 lines]
>> R> is the reason for it and how to resolve it?
>> R
Roy - 02 Mar 2008 04:15 GMT
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

> Hello Roy,
>
[quoted text clipped - 49 lines]
> >> R> is the reason for it and how to resolve it?
> >> R>
Roy - 02 Mar 2008 06:36 GMT
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. ---&gt;
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&amp; offset, Int32&amp; size, Boolean&amp; 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?
Noah - 22 May 2008 20:21 GMT
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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.