How to start ASP.Net State Service in Azure

与世无争的帅哥 提交于 2019-12-10 11:04:34

问题


While deploying my application in azure i got this error when a session variable is used

I know this error is due to ASP.Net state server mode. I started the service in my local PC but how to start this service in Azure environment?


回答1:


You can use a start up task to spin up the State Service (or really any service for that matter). However, I would highly recommend that you do not use the session state service. I'd recommend looking at the In Role Windows Azure Cache or the Windows Azure Cache Service (Preview) for session state.

By using the session service you separate your session concerns from your web servers. It is still in preview, so if that concerns you, look at the In Role cache, which won't cost any more to run and can be distributed across multiple machines. Also, if you think the latency to pull from the cache service will be too high then the InRole cache may turn out to be better for you (you'd have to test to be sure).



来源:https://stackoverflow.com/questions/21508051/how-to-start-asp-net-state-service-in-azure

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!