Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

$4.95 Windows Hosting at Webhost4life.com
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
SteadyRain
DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  static variables shared among all user and all module instance
Previous Previous
 
Next Next
New Post 7/25/2007 6:24 AM
User is offline Gigelf
1 posts
10th Ranked


static variables shared among all user and all module instance 

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 Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  static variables shared among all user and all module instance
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DNN Outsourcing
50% more affordable services comparing to Western Europe and US: Custom DotNetNuke module development, skins, consulting, maintainence... Over 15.000 working hours of experience in custom DotNetNuke Solutions development, 8 years experience in outsourcing, excellent references!
www.dnnoutsourcing.com
Expressnet - DotNetNuke Hosting
Expressnet provide premium quality ASP.NET Web Hosting. We specialise in Windows based products including ASP.NET and Microsoft SQL Server. We offer fantastic value packages for DotNetNuke hosting. We also offer free asp.net web hosting
www.expressnet.com.au
Softech Development, Inc.
We help your business work smarter with DotNetNuke. Whether you need a new implementation, a custom module or skin for an existing implementation, or integration with your business processes, Softech has the experience and expertise to make it happen.
www.softechdevelopment.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP