0

My application uses MVC3 connected to a back end Azure table storage. I use AspProviders for login and logout.

There are times when I can confuse the AspProviders such that I will see the problems listed here

What I would like to know is why does my application even need to store session state. The way my application works is that every page call is independent and it could be sent to any running instance. With this in mind am I adding additional overhead by storing session data and is it really needed?

I hope someone out there can give me some advice.

Thanks,

Jon Wiley

Community
  • 1
  • 1

2 Answers2

1

You do not need session state and can even let the application know that, explicitly, that your controller will not be using session at all.

[SessionState (System.Web.SessionState.SessionStateBehavior.Disabled)]
public class MySessionlessController : Controller
{
   ...
}

Just remember that there are little "gotchas" that you might run into (TempData, for example, relies on session state by default).

Hope this helps.

Jim D'Angelo
  • 3,952
  • 3
  • 25
  • 39
1

If none of your application code uses any Session storage, then you can simply remove the Session provider from your web.config


Please also be careful using the AspProviders from the original PDC08 samples - these were never fully QAed to a commercial level.

Stuart
  • 66,722
  • 7
  • 114
  • 165