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

  • SEARCH
  • Home
  • 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 7218393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T21:28:34+00:00 2026-05-28T21:28:34+00:00

I created a sessionful service using NetTcpBinding: each client begins a session with the

  • 0

I created a sessionful service using NetTcpBinding: each client begins a session with the service, so I need to identify each session in some way. Obviously when a session ends, its identifier should also change, so that the application can understand that the client probably has changed.

I do not know if WCF or, in general, .NET provides a way to uniquely identify the various active sessions based on the requirements that I just described.

Alternatively I thought about the following idea:

public class ConnectionIdentifier {
    public UInt16 ConnectionNumber {get; set;}
    public Uint64 ConnectionTime {get; set;}
}

So, when a new session is established, I assign a session number (ie. ConnectionNumber) to it and the the time when the session was initiated (ie. ConnectionTime = DateTime.Now.Ticks).
However, in this case, how can I identify the end of a session to release the corresponding number?

Moreover, are there alternative ways to uniquely identify a session?

  • 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-28T21:28:35+00:00Added an answer on May 28, 2026 at 9:28 pm

    WCF has built in functionality for this. The way to do it is to mark your service contract as “Per Session”, you then get an instance of your service for each client/session.

    See: http://msdn.microsoft.com/en-us/magazine/cc163590.aspx

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

Sidebar

Related Questions

I created a UITableViewCell in Xcode 4 using IB. But for some weird reason
Created .NET WCF service, tested it - works. Generated schemas from Data and service
I created a program using dev-cpp and wxwidgets which solves a puzzle. The user
I created a few mediawiki custom tags, using the guide found here http://www.mediawiki.org/wiki/Manual:Tag_extensions I
I created a wcf service based on ServiceHostFactory, and i'm hosting it in IIS6.
I created a new SharePoint portal for testing purposes using a manually added HOSTS
Created basic C++ DLL and exported names using Module Definition file (MyDLL.def). After compilation
Created using Sphinx 0.6.5. I know Python's documentation uses reStructuredText , but it has
Created a profile using content provider. After running it correctly, added 3 fields to
Created an Accordion side bar using jQuery 1.2.6. I cannot access newer version of

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.