Hi,
I have an application I have just deployed which, for complicated reasons, stores all the data from the database in a module the first time any data from the specific table is required (i.e. when a customer requests to view a product for the first time, all the product data is stored in the ProductManager class (of which an instance is stored in a shared property of the SiteContent class, making the ProductManager easily accessible from any page).
Now forget that you are probably now glaring at me for using this approach.. I am sure it has its inefficiencies but I have only been studying .Net for a year or so now so I am still learning.
One thing I have noticed is that I can go on the site once, then revisit it 5 minutes later and it will load all the data into the ProductManager class again. It seems this is a .Net application timeout thing - since the session timeout is set to 30 minutes and, when I am logged in on the administration frontend, it logs me out after 5 minutes (ish).
Does anyone have any idea how to change this? Is there any way I can change this in the code without having to contact the hosting company? If not in the code is there any way to change this in the web.config?
Thanks in advance.
Regards,
Richard
More details:
The module (SiteContent) stores an instance of each "Manager" class - pages can call Manager.Create, Manager.Update, Manager.Remove etc etc and use Manager.Items to access a list of items stored in the manager (for example SiteContent.ProductManager.Items returns all the products stored in the database and SiteContent.UserManager.Items returns a list of all users stored in the database). It seems that, because it is a module, it is shared between users and page loads.
I have tried coming back to a page and reloading it after 3 - 4 minutes and it loads fine, but after about 5 minutes it takes a few seconds to load the page again (not long - but I would rather it didnt add a few seconds to the first page load every 5 minutes).
This is particularly annoying for my Dad (the owner of the business) when he is entering products which take more than 5 minutes to enter or which, when entering them, he takes a break for 2 minutes and then it asks him to login again on clicking submit, losing all his data at the same time. I am not using a method specified in the authentication section of the web.config for logging in - I am using a form with a login button, and clicking it compares the entered username and password to that of each user (through SiteContent.UserManager.Items).
Other than this I dont know exactly what you want to know.. can you expand on any specifics you need to know?
On doing some googling I have found out that there is an executionTimeout and a shutdownTimeout which I will have a go at changing..
More details:
hmm seems I just solved the page load time problem.. I noticed that the test database was over 13MB and the live database was only 3MB. I had a little investigate into this.
Basically the error logger will log every time and image cant be found if it is requested in the catalogue page. The test site hasnt been kept up to date with the images, since it doesnt need to be, so the missing image table had gone up to > 10MB.. gonna have to disable image logging on test. I deleted everything from that table and everything loads quickly now.
As for the timeout thing, I am going to leave that till a later date now - I am spending way too much time on this when I have more important things to prioritize at this moment - this website was actually my final year project at uni, and I have a presentation about it on Friday.. will be sure to add more details to this post about how I get on with this problem in the future, so please check back here from time to time..
Thanks for spending so much time on this..
Regards,
Richard