Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 798109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:55:04+00:00 2026-05-14T22:55:04+00:00

I am using a session mode for my WCF service. The problem is the

  • 0

I am using a session mode for my WCF service. The problem is the following: if session is broken and no longer exists, client can’t know it before calling a contract.

For example, if the service has been restarted, the client’s session id is invalid, because that session has been closed on the server side.

I check the channel state before calling the contract and its value is CommunicationState.Opened even if session is already broken. So, when I call the contract after this check I get a CommunicationException with this message:

The remote endpoint no longer recognizes this sequence. This is most likely due to an abort on the remote endpoint. The value of wsrm:Identifier is not a known Sequence identifier. The reliable session was faulted.

Is there any workaround? I need a way to get an appropriate session state before calling a contract so that I can restore it without getting an exception.

P.S. The CommunicationException type is general, so I can’t detect a session crash by catching this exception.

P.P.S. I have asked the similar question here, but in that case I didn’t know the reason, now I don’t know how to evade it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:55:05+00:00Added an answer on May 14, 2026 at 10:55 pm

    No, there is no workaround – all you can (and should do) is use proper defensive programming principles to be able to catch and handle those kind of exceptions as they happen.

    If the server crashes or the network goes down, unfortunately, there’s no mechanism to inform all potential clients of this case – they’ll just find out the next time they try to call.

    Update: yes, the CommunicationException is just the common base class for all exceptions related to WCF – check out the MSDN docs to see about all the descendant exceptions you can catch to be more specific – EndpointNotFoundException, FaultException (or FaultException<T>), ProtocolException and many many more!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Specifically this is regarding when using a client session cookie to identify a session
I have two PHP scripts, both using the same session by calling session_name('MySessID') .
I've got a load-balanced (not using Session state) ASP.Net 2.0 app on IIS5 running
I am using a Session Parameter on an ObjectDataSource. It works fine on the
Currently I'm using a session-per-request approach to manage Hibernate sessions in a Java web
I'm trying to automate a gdb session using the --command flag. I'm trying to
Suppose I want to open a file in an existing Emacs session using su
I've been tasked with converting an existing ASP.NET site from using InProc session management
Using in-process session state is evil when it comes to scaling web applications (does
I am trying to set Session values using a IHttpModule. I have set the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.