Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Session variables in asp.net

Reply
Thread Tools

Session variables in asp.net

 
 
Newbie
Guest
Posts: n/a
 
      05-19-2004
Hi All,
I would really appreciate any ideas / clues on this issue which I am facing.
I have a asp.net application, the problem is with maintaining session
variables while using authentication for different users. My users are
divided in groups , and have a username and pwd to login. Now if suppose
while browsing through different pages, the session expires unexpectedly,
then also I need the user to keep working with the app. This sometimes
results in erroneous behaviour, coz all info in session variables is lost.
And since the username and pwd info is kept in cookies. So to avoid this how
can I maintain session variables with cookies ? Can session variables be
created by default, along with login name and pwd and other details?
Thanks.



 
Reply With Quote
 
 
 
 
Teemu Keiski
Guest
Posts: n/a
 
      05-19-2004
Hi,

you might want to find out why the session ends unexpectedly. If you use
InProc session mode, here are some tips:
http://www.asp.net/Forums/ShowPost.a...&PostID=232621 (e.g
session ends because of app restart).

If this won't help or you can't or won't solve it with this, you can switch
the app to use out-of-process session mode when app restart won't bring the
sessions down. More about them:
http://www.asp.net/Forums/ShowPost.a...=1&PostID=7504

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke


"Newbie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
> I would really appreciate any ideas / clues on this issue which I am

facing.
> I have a asp.net application, the problem is with maintaining session
> variables while using authentication for different users. My users are
> divided in groups , and have a username and pwd to login. Now if suppose
> while browsing through different pages, the session expires unexpectedly,
> then also I need the user to keep working with the app. This sometimes
> results in erroneous behaviour, coz all info in session variables is lost.
> And since the username and pwd info is kept in cookies. So to avoid this

how
> can I maintain session variables with cookies ? Can session variables be
> created by default, along with login name and pwd and other details?
> Thanks.
>
>
>



 
Reply With Quote
 
 
 
 
Janaka
Guest
Posts: n/a
 
      05-20-2004
Hi Newbie,

There are a couple of different ways of storing sessions in ASP.NET. Sounds
like your using the InProcess flavour. You can also check out using
SqlServer to store your session information if your worried about the
redundancy of the session data. I haven't tried it but the web.config
allows you to set a cookieless="true|false" attribute in the <sessionState>
node. This works by appending the sessionid to the url querystring.

Also what kind of authentication are you using? Sounds like you should try
using ASP.NET's built in role-based authentication.

J

"Newbie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi All,
> I would really appreciate any ideas / clues on this issue which I am

facing.
> I have a asp.net application, the problem is with maintaining session
> variables while using authentication for different users. My users are
> divided in groups , and have a username and pwd to login. Now if suppose
> while browsing through different pages, the session expires unexpectedly,
> then also I need the user to keep working with the app. This sometimes
> results in erroneous behaviour, coz all info in session variables is lost.
> And since the username and pwd info is kept in cookies. So to avoid this

how
> can I maintain session variables with cookies ? Can session variables be
> created by default, along with login name and pwd and other details?
> Thanks.
>
>
>



 
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
Put variables into member variables or function variables? tjumail@gmail.com C++ 9 03-23-2008 04:03 PM
Session Variables and Static Variables cobus.lombard@gmail.com ASP .Net 1 03-26-2006 11:05 AM
RE: Session Variables assigned to the wrong session? Robert Faulkner ASP .Net 0 01-28-2005 04:16 PM
Session Variables assigned to the wrong session? =?iso-8859-15?Q?Fabr=EDcio_de_Novaes_Kucinskis?= ASP .Net 1 01-20-2005 04:33 PM
Global Session Variables and Session State Earl Teigrob ASP .Net 1 12-17-2003 07:02 AM



Advertisments