Hi,

The web application I developed throws an error to get the domain name that I set using session variable in session_start in global.asax file. The error gets resolved if I upload the web.config file. But the problem is that the error comes up again. The support st the hosting company suggested me that it is something to deal with the application pool recycle for the website in IIS. But I cant get to the root of this problem.

Does session variables affect the application pool recycle??

Can someone please help me get this issue resolved?

Thanks in advance for your help..

Mev

Recommended Answers

All 2 Replies

Hi,

If your application pool is recycled then it can affect your sessions, you need to set the application pool recycle on the Application pool that your site is using in IIS - be aware other sites could also be using the same pool, so it maybe worth putting your site in it's own pool before doing this.

You can give the recycle a time out value e.g. after 27 hours recycle the pool or get it to recycle at a set time each day e.g. recycle the pool at 1 am each day.

If I was building something like an intranet where all your users where in a single time zone etc I'd go with the recycle at 1 am approach, if it's a web site where users could be coming in at any hour I'd push the recycle out as far as I could which I think is 27 hours...

Hi,

Thanks for your reply.

My site is under a sub domain. So there is a site in the root folder and another site inside the folder. The sites used to work fine on a shared hosting server. But the site in the sub domain is going down since it has been moved on a dedicated server. I have not changed app pool recycle time for the site and both the sites are in the default pool. But the site under sub domain crashes in less than 27 hours but varies every time.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.