Multi-tiered services (keeping sessions straight)

Discussion in 'ASP .Net Web Services' started by Thor Johnson, Oct 8, 2003.

  1. Thor Johnson

    Thor Johnson Guest

    Question summary:
    How can I make sure I use the same session when I call a webservice?

    Question details:
    Right now, I have 3 web services that play with each other (well... they don't work yet;):

    [Top-Tier]
    CommObject - This must be a webservice. It locates the appropriate CommDevice and makes requests.
    The corporate ASP pages use this Webservice to display values.

    [Middle-Tier]
    CommDevice - This tier takes requests, and handles the protocol implementation. These objects
    may/may not use the XMLGw to find the communication endpoint.
    CommDeviceA - This implements the comm channel for device A's
    CommDeviceB - This implements the comm channel for device B's

    [Bottom-Tier]
    XMLGw - This is a XML Gateway locater; the CommDevice objects use it to find the
    correct external object to communicate with.


    Right now, all three tiers are implemented as webservices so, for example, the CommObject
    can use a database+UDDI to find an eligable CommDevice.

    Each tier has data that needs to persist across function calls, so I store it in the session
    object.

    The problem:
    A typical execution scenario is:
    1 CommObject:FindCommDevice
    2 CommObject:ConnectToA, which does
    2a CommObject->CommDeviceA->XMLGw:Locate
    2b CommObject->CommDeviceA:Connect
    3 CommObject:ListValues, which does
    3a CommObject->CommDeviceA->XMLGw:ListValues

    Unfortunately, the SessionID in step 2a and 3a are different, even though the sessionID's
    in steps 2 and 3 (at the CommDeviceA level) are the same. How can I store and reuse the
    SessionID for the CommDeviceA->XMLgw calls?

    Alternatively,
    I suppose the CommDevice->XMLgw layer doesn't have to be a WebService... what would be the
    best way "combining" the projects so you can step through each layer in Visual Studio?
    (I tried just "adding" the XMLgw webservice project to the CommDeviceA Solution, but
    I got runtime errors that I couldn't debug "Couldn't Create CommDeviceA.CommDeviceA")


    TIA,
    Thor Johnson
    Thor Johnson, Oct 8, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy Fish
    Replies:
    1
    Views:
    406
    Jim Cheshire
    Jan 9, 2006
  2. Thirsty Traveler
    Replies:
    0
    Views:
    379
    Thirsty Traveler
    May 30, 2006
  3. Paul

    Basic N-Tiered structure in VB

    Paul, Jun 9, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    449
    Jorge Bustos
    Jun 10, 2006
  4. Replies:
    0
    Views:
    437
  5. Andy Fish

    NTLM Authentication with multi-tiered application

    Andy Fish, Jan 9, 2006, in forum: ASP .Net Security
    Replies:
    2
    Views:
    151
    Jim Cheshire
    Jan 9, 2006
Loading...

Share This Page