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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0static variables shared among all user and all module instancestatic variables shared among all user and all module instance
Previous
 
Next
New Post
7/25/2007 8:24 AM
 

Hello everyone!

 

I’m currently in training period and working for the first time with DotNetNuke. I’m building a national intranet, and I have developed a module in C#, a files explorer with content protection matching with roles and users.

My trouble is that in the process, I use static variables to save some parameters. When I’m the only one using this module it’s working without any problem. But when there is more than one user, they are sharing the static variables values, even if working on different pages which have my module. In that case, only the last user can work. Furthermore, if there is only one user, but twice the same module with different configuration on a single page, the static variable are also shared among the two module. In that case, only the second module is working.

For the moment, I found a way to fix it using a list of object and reloading values of my static variables when needed, but I guess there is something better. I also tryed to increase the number of worker on the website connection pool, but loadings became badly slow and there will be thousand of users. Maybe I should save my values in session variable instead of static variable? Is there a way to instantiate the whole behind code for each module added on the website?

 

I’m looking forward for your advises

 

PS: Forgive my English if I wasn’t clear enough

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0static variables shared among all user and all module instancestatic variables shared among all user and all module instance


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