CSLA & Asp.net

CSLA & Asp.net

Old forum URL: forums.lhotka.net/forums/t/6333.aspx

SouthSpawn posted on Wednesday, February 04, 2009

I am using a hosting provider.

I am using a few CSLA business objects.
These objects are being stored in session variables.

For some reason, we keep getting a "Service Unavailable" error every once in awhile.
I know this error doesn't say much here.

But could CSLA be a possible problem here?


JoeFallon1 replied on Wednesday, February 04, 2009

I doubt it.

Sounds much more like an ASP.Net Session issue.

There are 3 models for this:

1. In process - fastest but riskiest as you lose all session data when the AppDomain recycles - which happens more often than you might think.

2. Session State Server - Out of process - in memory of some server (even itself) - slower as you have to serialize the session blob in and out - but safer as you do not lose anything when the AppDomain recycles.

3. Database - Out of process - about the same speed as #2. Even safer as you do not lose anything even if the web server goes down.

Your problem may exist due to #1.



SonOfPirate replied on Thursday, February 05, 2009

The "Service Unavailable" message is a catch-all when an exception happens during processing of your ASP.NET request.  Make sure you set the "mode" attribute on the <customErrors> element in your web.config file to "Off" - the default is "RemoteOnly".  This will allow you to see the details of any error that occurs.  If you still get the generic "Service Unavailable" message, then it is something outside of your application such as what Joe described above.

Remember to set this attribute back to "RemoteOnly" when releasing your application into production as you don't want users to see the details.


RockfordLhotka replied on Thursday, February 05, 2009

Though I got this just "service unavailable" a couple days ago, because I'd foolishly forgotten to switch the virtual root from .NET 1 to 2... No amount of config file changes can help you then... :(

Copyright (c) Marimer LLC