Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...session variables of DNN492session variables of DNN492
Previous
 
Next
New Post
12/14/2009 9:03 AM
 

Hi guys,

I created this thread because of I get an timeout if I want to use the search-function.
My question is, how can I configure the "Session-variables" of an DNN492 Portal.

Iam programming in asp.net with c#.
for example my declaration of the session variable is like this:

Session["nameofthevariable"] = "";

Now my question is if I write something in this variable, log out of the portal, log in with an other username and then this variable lifes and containing the value.
I dnt want to have this value in this variable any more if the user log of. Is there a possibility to delete this variable automatically if someone logging of?

Or should I use an other way to save my personal specfic information? And if, what way?

Thanks for any help!

 

best regards,

marc

 

 
New Post
12/14/2009 2:52 PM
 

Marc,

If you want to seach the forums -- try the seach on the menu bar -- uses Google Search  - will not time out!

as for Session Variable -- if you want the value to stay for life of the module -- consider adding to view_state.  Alternatively, you could write the value to cache using a key unique to the user and SessionID.    Or consider adding the value to User Profile ... but in both cases you will need to determine if the data is "stale".  Depends on the business reason for keeping the information.    Remember there is promise that the user will "log-out".

Paul.

 

 
New Post
12/15/2009 3:57 AM
 

Hi Paul,

I could not get all of your information I think,
do you think is it possible to give me some code tips/hints how can I solve my problem?
Some links to blogs or something would be also nice.

Thanks for your help paul,

 

best regards,

marc

 
New Post
12/15/2009 9:30 AM
 

Marc,

If you can describe your business need -- why you need to keep the value(s) and for how long, I can better describe a solution.   Also, what version of DNN and Database your using.

Paul.

 
New Post
12/15/2009 2:28 PM
 

    Marc:

    What the others have said is correct but I want to add a couple of things.

    The issue you are dealing with is not unique to DNN, the session variable is doing what it is supposed to and would work the same way on any plain-old ASP.Net application without DNN.  There may be other solutions depending on what it is that you actually need to accomplish but in any case, if one user logs out, a new one logs in, and the session variables must be different, then you should initialize these variables to zero, blank, or any other default value that makes sense to you at the beginning of your module.  This is a good practice anyway.

    Hope this helps.

               Carlos

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...session variables of DNN492session variables of DNN492


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out