Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Using a db to share ASP session state var w/ ASP.NET page

Reply
Thread Tools

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

 
 
VB Programmer
Guest
Posts: n/a
 
      06-08-2004
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?


 
Reply With Quote
 
 
 
 
Raterus
Guest
Posts: n/a
 
      06-08-2004
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.

"VB Programmer" <(E-Mail Removed)> wrote in message news:%235i$(E-Mail Removed)...
> 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?
>
>

 
Reply With Quote
 
 
 
 
VB Programmer
Guest
Posts: n/a
 
      06-08-2004
Thanks Raterus. I'll search online for some examples.
"Raterus" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
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.

"VB Programmer" <(E-Mail Removed)> wrote in message
news:%235i$(E-Mail Removed)...
> 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?
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Share-Point-2010 ,Share-Point -2010 Training , Share-point-2010Hyderabad , Share-point-2010 Institute Saraswati lakki ASP .Net 0 01-06-2012 06:39 AM
difference between asp session state and asp.net session state. archana ASP .Net 0 03-13-2007 11:42 AM
ASP.NET 2.0 Session State and ASP.NET 1.1 Session State jnickfl1 ASP .Net 0 09-18-2006 03:23 PM
Difference between Session["var"] and Session("var") thomson ASP .Net 10 06-20-2005 01:02 PM
Difference between Session["var"] and Session("var") thomson ASP .Net 0 06-20-2005 10:54 AM



Advertisments