Maintaining web service state in a web app

D

DwC

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

Thanks
 
L

Lucas Tam

DwC said:
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?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top