(.NET Framework 3.5, ApplicationPool is set to Version 2.0)
I have a asp.net application consisting of 2 Pages. A login Page and a default page where you can search and a grid with data is displayed.
I also use a Class called Web, where my current connected Instances are stored. It is a shared (m_Instances) variable of type DICTIONARY(String, application)
the application is a object that holds connection to database, some datatables, user information and so on.
Now the problem: When i'm testing my application with multi user and one user logs out and gets redirected to the login page and an other is using the web application, my Shared Variable m_Instances is set to NOTHING and i cannot use it anymore. I have to
initialize the dictionary again and have to reopen connections and that makes the application pretty slow some times, because i'm using a sync lock for my m_Instances-Object. There is no code where i set the object to nothing.
Any ideas?
Edit: I just tried implementing caching but here i have the same problem, when i logout with one user and i load the page again with an other user the pagecache is 0. Like it was all cleared...
Nachtmahr
0 Points
8 Posts
Shared Objects are getting set to nothing?? (even cache is reset)
Dec 04, 2012 07:22 AM|LINK
Hey,
(.NET Framework 3.5, ApplicationPool is set to Version 2.0)
I have a asp.net application consisting of 2 Pages. A login Page and a default page where you can search and a grid with data is displayed.
I also use a Class called Web, where my current connected Instances are stored. It is a shared (m_Instances) variable of type DICTIONARY(String, application)
the application is a object that holds connection to database, some datatables, user information and so on.
Now the problem: When i'm testing my application with multi user and one user logs out and gets redirected to the login page and an other is using the web application, my Shared Variable m_Instances is set to NOTHING and i cannot use it anymore. I have to initialize the dictionary again and have to reopen connections and that makes the application pretty slow some times, because i'm using a sync lock for my m_Instances-Object. There is no code where i set the object to nothing.
Any ideas?
Edit: I just tried implementing caching but here i have the same problem, when i logout with one user and i load the page again with an other user the pagecache is 0. Like it was all cleared...
Nachtmahr
0 Points
8 Posts
Re: Shared Objects are getting set to nothing?? (even cache is reset)
Dec 04, 2012 01:23 PM|LINK
I solved the problem myself:
After logout i deleted a folder within the application directory. Thus the application pool was always recycled.
rajish
Member
424 Points
89 Posts
Re: Shared Objects are getting set to nothing?? (even cache is reset)
Dec 20, 2012 01:02 AM|LINK
thank you for sharing it