views:

61

answers:

2

hi,

My asp.net mvc application, requires me to login every 20-50 seconds, i contacted the hosting provider, who says its due to recycle of pool.

i have added following code to web.config.

<sessionState mode="StateServer" stateConnectionString="tcpip=localhost:42424" cookieless="false" timeout="20"/>

the problem is not solved, how do i serialize the authentication part, suggestions any one.

Thank you in advance.

+1  A: 

The root of the problem is obviously that the pool is recycling WAY too frequently. Did you get any response from the host on what might be causing that?

Don't band-aid the problem, find the solution to the problem of the app pool recycling.

To help diagnose your problem, consider:

  • deploying your app locally to a new IIS application. Use all the defaults. Do the symptoms exist in this setting?
  • inspect the settings through whatever user interface your hoster gives you. Are there any settings that could've been modified that would cause this? Here's the default App Pool settings in IIS7.
p.campbell
my hosting is a shared one, so i dont think they will change what the are doing, they say using serialization will be the solution
The first rule of Tautology Club is the first rule of Tautology Club!
David Lively
+1  A: 

I agree with p.campbell that their are bigger concerns here with the app pool. Possible causes of this problem

  • Your hosts are trying to squeeze too many shared hosts onto a single server (and so the server is running out of memory)
  • Your application has outgrown the hosting environment and you should consider a move to dedicated hosting or at least contact your host regarding the possibility of upgrading your app pool.
  • Your application has a serious bug in it that is causing the app pool to restart.

Want to narrow it down? Depending on the issue you may find that enabling ASP.NET health monitoring on the site to log application events to a file/e-mail/SQL server could shed some more light on the matter.

Gavin Osborn