Thursday, March 22, 2012

Maintaining web service state in a web app

Hey All,
I have a web service that maintains it's own state so once the user has
successfully called the Login method a logged in flag is set in session.
Each method checks that the user is a valid user and has logged in
before returning anything.
I have a windows front end for the web service where i can maintain a
single instance of the web service so that the user remains logged in
regardless of the form etc. as the same object is being called.
The problem that i have run into is that i also need to have a web
interface for this web service and on each of the pages a new web
service is created thereby losing the logged in state.
I have tried storing the web service object in the session state from
the asp page, but the state is not maintained when i pull it back out again.
Is there a way that i can use a single web service object between
different asp pages...or should i change the way that the web service
maintains it's state'
Any help or suggestions would be much appreciated
ThanksDwC <email@.email.com> wrote in news:434e6fd8$1@.dnews.tpgi.com.au:

> Is there a way that i can use a single web service object between
> different asp pages...or should i change the way that the web service
> maintains it's state'
Web services typically do not maintain state.
What type of state information do you need?
Perhaps you can store the state information in a session object, and pass
it to the web service on each call?
Lucas Tam (REMOVEnntp@.rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
Newmarket Volvo Sucks! http://newmarketvolvo.tripod.com

0 comments:

Post a Comment