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

  • Thread starter Thread starter VB Programmer
  • Start date Start date
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?
 
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.
 
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.
 
Back
Top