Click here to Skip to main content
15,794,593 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have problem with logout.I have two sessions: the customer's session,a worker's session and Application["supportWorker"].The customers can log out,know worker's status and log out workers.
How to the customer can not log out workers?
They can just see workers.
Rahul Rajat Singh 15-Jun-12 0:27am    
not clear. please elaborate.

1 solution

the customer's session,a worker's session and Application["supportWorker"].
Sessions are user specific. Application variable is across all users.

If worker session is tied to a customer then as soon you logout customer and clear sessions, worker session will also get cleared. It's the ASP.NET design, the way it works clears all session specific to a user. If you want to keep something alive use application variable.

Read about state managment here:
MSDN: ASP.NET State Management Overview[^]
State management in ASP.NET - 1[^]
ASP.Net State Management Techniques - 2[^]
Share this answer
giatuan2011 15-Jun-12 0:14am    
So,the problem is Application variable?
I think I'll use Session when worker login then store in Application and lock it.All users can know workers status.But they can't logout worker.When the customer/worker logout,I'll check Session.If Session["worker"] exists,Application'll be removed.If not,he is the customer.He can't remove Application

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900