简体   繁体   中英

Do I need SessionStateModule in my ASP.NET MVC3 application hosted in Azure web role?

In my ASP.NET MVC3 application I don't ever explicitly use SessionStateModule and so I assume I can just remove it by changing web.config . The application is hosted in Azure web role so I can't rely on per-instance session states anyway, can I?

Will removing this module likely break something or can I just remove it?

You are right, InProc will not work on Windows Azure. Here some options:

-Store session state using Sql Database

-Store session state using Table storage

-Store session state using Windows Azure Caching (recommended)

More information in here:

http://msdn.microsoft.com/en-us/library/windowsazure/gg185668.aspx

https://www.simple-talk.com/cloud/platform-as-a-service/managing-session-state-in-windows-azure-what-are-the-options/

It depends on how your application is designed and what features you are using. If the application is 100% stateless, then session state can be removed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM