locked
WCF nettcpbinding hosted windows service Connection time out error RRS feed

  • Question

  • Hi,

       Can you please help me to fix the Connection time out error. below is my Requirement

       I have Implemented business logic in WCF with nettcpbinding and callback contract hosted as a Windows Service.As My WCF service will send the data to my client windows Application.

      So, what's wrong is below are the Questions

    1.    After 10 min my windows service is shutting down, I wrote a logic by keeping timer to wake up.
    2.    My WCF service is not responding throws an error even though windows service is up and running

       So, I need your help like My service WCF nettcpbinding to run  Timeout.Infinite and my windows service need to respond always.

      Do we need to edit any where else in Binding configuration file like receivetimeout?? I tried but of no use.

    Errors:

    output session was auto-closed due to a server-initiated shutdown

    Wednesday, June 25, 2014 1:27 AM

Answers

All replies

  • Hi,

       Can you please help me to fix the Connection time out error. below is my Requirement

       I have Implemented business logic in WCF with nettcpbinding and callback contract hosted as a Windows Service.As My WCF service will send the data to my client windows Application.

      So, what's wrong is below are the Questions

    1.    After 10 min my windows service is shutting down, I wrote a logic by keeping timer to wake up.
    2.    My WCF service is not responding throws an error even though windows service is up and running

       So, I need your help like My service WCF nettcpbinding to run  Timeout.Infinite and my windows service need to respond always.

      Do we need to edit any where else in Binding configuration file like receivetimeout?? I tried but of no use.

    Errors:

    output session was auto-closed due to a server-initiated shutdown

    Tuesday, June 24, 2014 10:57 AM
  • Hi,

    In WCF by default the value of the receiveTimeout is 10min. If in the 10min the service and client has no data transfer. Then the service will close the connection with the client.

    For more information, please try to refer to:
    #Explaination of different timeout types:
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/84551e45-19a2-4d0d-bcc0-516a4041943d/explaination-of-different-timeout-types?forum=wcf .

    In my mind if you want to the keep the connection all the alway, first please try to set the timeout value to a large value. Then maybe you can use the timer in the client with a method to call the service. So before reaching the timeout value, the client and the service has the data transfer, then the connection will not close.

    Besides, please also try to check this thread:
    http://stackoverflow.com/questions/1985225/dealing-with-wcf-service-restart-on-client-side .

     

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.



    Wednesday, June 25, 2014 9:41 AM