Reliable Session problem

Hi,

I know that after 10min without receive data the session is lost, so I have a time from client to send any data(i.e simple `KeepAlive()` method ) to server each 7min.

But, sometime the server show this error :

----------------------------------------
Error Error: 100 : Timestamp: 10/15/2006 9:08:17 PM
Message: HandlingInstanceID: c40e9081-16ba-4982-acf3-061a88d902cf
An exception of type 'System.ServiceModel.CommunicationException' occurred and was caught.
------------------------------------------------------------------------------------------
10/15/2006 18:08:17
Type : System.ServiceModel.CommunicationException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : The sequence has been terminated by the remote endpoint. Due to a user abort the reliable session cannot continue. The reliable session was faulted.
Source : System.ServiceModel
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : TAsyncResult End[TAsyncResult](System.IAsyncResult)
Stack Trace : at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result)
at System.ServiceModel.Channels.InputQueue`1.AsyncQueueReader.End(IAsyncResult result, T& value)
at System.ServiceModel.Channels.InputQueue`1.EndDequeue(IAsyncResult result, T& value)
at System.ServiceModel.Channels.DuplexChannel.EndTryReceive(IAsyncResult result, Message& message)
at System.ServiceModel.Dispatcher.DuplexChannelBinder.EndTryReceive(IAsyncResult result, RequestContext& requestContext)
at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext& requestContext)

Does anybody know how to resolve it

Thanks,
Alexnaldo Santos



Answer this question

Reliable Session problem

  • Oscar Marin

    by default receive timeout value also 10 mins,so session has to live for 10 mins(if you are using default settings)

    Make sure client is not closing the proxy and then trying to reuse same proxy

    if you have client and service on same machine,are you experiencing same problem (just to make sure it is not some network problem)

    please enable WCF verbose trace and trace may provide more info about,who is closing the session.

    if you have repro,please send it to me also,my email id is madhup@microsoft.com

     

     



  • BTJ

    Hi,

    I found the problem :

    My Service is "PerSession", so if I finish my Client( i.e. serviceproxy.Close() ) after 10min my Service raise the exception on Server...How to finish the reliable session into a normal way

    Response :

    I must create a operation with "Termining=true" and "OneWay=false" (i.e. like a Leave() ), so before finish my Client I call 'serviceproxy.Leave()".

    After it all work fine !!!!!

    Note: I'm using "OneWay=false" because without it sametime I receive a exception about 'faulted state to receive message'. Does WCF receive response(only tcp response) even if the operation is 'OneWay=true' If so, "OneWay=true" can't be used with "Termining=true".

    Am I correct

    Thanks,
    Alexnaldo Santos


  • Bruno Kovačić

    If receivetimeout < reliablesessiontimeout,it may terminate session very early,please change service receivetimeout(receivetimeout > reliablesessiontimeout),This may resolve the problem.

  • vbjunkie

    But before timeout I send data to server... I'm using the default settings for receivetimeout and reliablesessiontimeout. I know that reliablesessiontimeout default is 10min...and receivetimeout


  • Reliable Session problem