Using a db to share ASP session state var w/ ASP.NET page

V

VB Programmer

I've read that you can save a session state variable created by an ASP page
into a db so that the value of the session state variable can be read/used
by an ASP.NET webform.

Question: Let's say the session variable is called "UserIsAdmin" and the
ASP page is the login page. When the person logs in as 'admin' it stores
the session variable as "True" in a db. How does the ASP.NET page that is
served up know whether the page requestor is the same user or a different
user? If "UserIsAdmin" is set to True in the db, won't anyone be able to
get in as 'admin' because this db value has been set? Am I missing
something?
 
R

Raterus

I think you are missing the fact you can't do it :)
Now a db can share data between the two, but you aren't going to set/get it through the session object, you'll have to create your own object for that. Also, like you're stuck on, you'll need to set some indentifying information in the querystring/cookies to know who is who between platforms.
 
V

VB Programmer

Thanks Raterus. I'll search online for some examples.
I think you are missing the fact you can't do it :)
Now a db can share data between the two, but you aren't going to set/get it
through the session object, you'll have to create your own object for that.
Also, like you're stuck on, you'll need to set some indentifying information
in the querystring/cookies to know who is who between platforms.
 

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,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top