Click here to Skip to main content
11,639,554 members (68,258 online)
Click here to Skip to main content

Tagged as

WCF Duplex Service Exceeded Timeout of 00:00:00

, 18 Feb 2013 CPOL 5.2K 3
Rate this:
Please Sign up or sign in to vote.
We can use the clientBaseAddress to set the IP Address as the base address for the callback channel. We can also set another port there if we want.

In case you use WCF duplex services using wsDualHttpBinding, there is a chance to get a very strange error:

The HTTP request to 'http://vasil-trifonov.blogspot.com/DuplexService.svc' 
has exceeded the allotted timeout of 00:00:00. 
The time allotted to this operation may have been a portion of a longer timeout.
StackTrace: at System.ServiceModel.Channels.HttpChannelUtilities.SetRequestTimeout(HttpWebRequest request, 
TimeSpan timeout) at 
System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.SendRequest
(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)

It turns out that the server where the service is hosted did not see the machine that calls the service. So if you get this error, make sure that the server can ping the caller.

Another problem can be that the server may not be able to resolve the temporary listening address as it will be something like:

http://trifonov-pc/Temporary_Listen_Addresses/4881e24d-9d46-48dd-a013-399d8fab8757/ccc1d9b8-adbb-479d-a721-517b2162ad6c

The remote machine may be in another domain and may not be able to resolve the caller by name. In that case, you can use the clientBaseAddress in the caller configuration.

<wsDualHttpBinding>
 <binding name="duplexBinding" closeTimeout="00:01:00"
  openTimeout="00:01:00" receiveTimeout="00:10:00" 
  sendTimeout="00:01:00" bypassProxyOnLocal="false"
  transactionFlow="false" hostNameComparisonMode="StrongWildcard"
  maxBufferPoolSize="524288" maxReceivedMessageSize="1073741824"
  messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" 
  clientBaseAddress="http://192.168.0.100/Temporary_Listen_Addresses">
  <readerQuotas maxDepth="32" maxStringContentLength="2147483647" 
  maxArrayLength="16384"
    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
  <reliableSession ordered="true" inactivityTimeout="00:10:00" />
  <security mode="Message">
   <message clientCredentialType="Certificate"/>
  </security>
 </binding>
</wsDualHttpBinding>

We can use the clientBaseAddress to set the IP Address as the base address for the callback channel. We can also set another port there if we want.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Vasil Trifonov
Software Developer (Senior) Telerik
Bulgaria Bulgaria
No Biography provided

You may also be interested in...

Comments and Discussions

 
QuestionCannot get this working over the internet Pin
Lawrence Thurman16-Jul-14 2:08
memberLawrence Thurman16-Jul-14 2:08 
AnswerRe: Cannot get this working over the internet Pin
Vasil Trifonov16-Jul-14 2:57
memberVasil Trifonov16-Jul-14 2:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150731.1 | Last Updated 18 Feb 2013
Article Copyright 2013 by Vasil Trifonov
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid