Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
i want to know that it is possible to check multiple session on one page. if yes, how ?
 
because i am using some task same for Admin as well as special user at user side. so i do not want repetation to do in user side. if this problem solved, same things be not happend two times.
 
e.g in admin panel create two reports and in both page load event check only one admin session. so that both report shown to the some special user at user side.
 
Please Help Me..
Mitesh
Posted 7-Jun-12 21:31pm
Edited 7-Jun-12 21:32pm
v2
Comments
Sandeep Mewara at 8-Jun-12 3:55am
   
Not clear. Please rephrase.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The answer is no for session. These are user based and it is not possible to share data using this mechanism.
 
However, there are a few other options you should consider.
 
1) If you are using the roles provider with ASP.NET (I take it that you are referring to ASP.NET) you should have a role assigned to each user. Using the roles provider you could easily distinguish between who is admin and who is a normal user.
 
http://msdn.microsoft.com/en-us/library/ff647401.aspx[^]
 
2) Consider using application state. This is the same as session but is globally available to all users. There could be some token or information in the state that could be used to distinguish who is online etc. This is used in the same way as session state.
 
A Walkthrough to Application State[^]
 
3) use the asp.net caching to store data or information:
 
Caching in ASP.NET[^]
  Permalink  

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 662
1 ChauhanAjay 170
2 CHill60 130
3 Maciej Los 125
4 CPallini 110
0 Sergey Alexandrovich Kryukov 9,735
1 OriginalGriff 6,989
2 CPallini 5,825
3 George Jonsson 4,017
4 Gihan Liyanage 3,266


Advertise | Privacy | Mobile
Web04 | 2.8.140926.1 | Last Updated 8 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100