Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Multi-tiered services (keeping sessions straight)

Thread Tools

Multi-tiered services (keeping sessions straight)

Thor Johnson
Posts: n/a
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:

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

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

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

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?

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")

Thor Johnson
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Moving from ASP Sessions to Database Sessions Bookham Measures ASP General 19 08-23-2007 03:51 PM
Cookieless Sessions (Sessions Without Cookies) and Security scottymo ASP .Net Security 3 09-29-2006 11:00 PM
Sessions with web services Joshua Ellul ASP .Net Web Services 1 02-16-2004 07:07 AM
how to implement Services Interface Tier (web services) Szymi MCSD 0 11-03-2003 10:50 AM
Re: Relationship between IIS Sessions and ASP.NET Sessions? Ken Cox [Microsoft MVP] ASP .Net 1 08-08-2003 03:22 PM