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