Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Unique Remote thread/context ID

Unique Remote thread/context ID

Scheduled Pinned Locked Moved C#
sysadminregexhelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dr Herbie
    wrote on last edited by
    #1

    Hi, I want to write a centralised session server that runs as an SAO for remote access. This will essentially be a dictionary for session objects keyed by a unique identifier (based on the 'Virtual Singleton' pattern). My problem is : what should I use as the unique identifier -- it must be unique to the program instance running on the network. I initailly thought of the remoting context as the key, but I'm not sure that is the best way (are context's unique accross the whole network, or only to each PC?). Is there some combination of AppDomain property and thread property that is unique accross a network? TIA Dr Herbie. Remember, half the people out there have below average IQs.

    A 1 Reply Last reply
    0
    • D Dr Herbie

      Hi, I want to write a centralised session server that runs as an SAO for remote access. This will essentially be a dictionary for session objects keyed by a unique identifier (based on the 'Virtual Singleton' pattern). My problem is : what should I use as the unique identifier -- it must be unique to the program instance running on the network. I initailly thought of the remoting context as the key, but I'm not sure that is the best way (are context's unique accross the whole network, or only to each PC?). Is there some combination of AppDomain property and thread property that is unique accross a network? TIA Dr Herbie. Remember, half the people out there have below average IQs.

      A Offline
      A Offline
      Arjan Einbu
      wrote on last edited by
      #2

      GUIDs are unique. Will they do? Guid x = Guid.NewGuid(); From MSDN Library: GUID represents a globally unique identifier. A GUID is a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a very low probability of being duplicated.

      D 1 Reply Last reply
      0
      • A Arjan Einbu

        GUIDs are unique. Will they do? Guid x = Guid.NewGuid(); From MSDN Library: GUID represents a globally unique identifier. A GUID is a 128-bit integer (16 bytes) that can be used across all computers and networks wherever a unique identifier is required. Such an identifier has a very low probability of being duplicated.

        D Offline
        D Offline
        Dr Herbie
        wrote on last edited by
        #3

        Arjan Einbu wrote: GUIDs are unique. Will they do? My intent for this design is to remove any explicit token passing. I already have a session object which has to be passed accross to the remote object to identify the user. I wanted to avoid having to explicitly pass any extra variables, so I was hoping that the thread/context/appdomain might contain something I could use to uniquely identify the client. E.g. Instead of: public void SAO:PerformAction(token ClientIdentifier, int parameter) { CheckSecurity(ClientIdentifier); DoStuff(parameter); } I could do: public void SAO:PerformAction(int parameter) { CheckSecurity( GetUniqueTokenFromCallersContext() ); DoStuff(parameter); } I'm trying to make the remoting interfaces as seamless as possible and I personally hate having to have an identifier token passed to every SAO method. X| Maybe I'm hoping for too much. :sigh: Dr Herbie. Remember, half the people out there have below average IQs.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups