如何在Azure中启动ASP.Net状态服务 [英] How to start ASP.Net State Service in Azure

查看:106
本文介绍了如何在Azure中启动ASP.Net状态服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Azure中部署应用程序时,使用会话变量时出现此错误

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

我知道此错误是由于ASP.Net state server mode引起的.我在本地PC上启动了该服务,但是如何在Azure环境中启动该服务?

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?

推荐答案

您可以使用角色Windows Azure缓存 Windows Azure会话状态的缓存服务(预览).

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.

通过使用会话服务,您可以将会话问题与Web服务器分开.它仍处于预览状态,因此,如果您有任何疑问,请看一下In Role缓存,该缓存不再花费任何运行时间,并且可以分布在多台计算机上.另外,如果您认为从缓存服务中获取的延迟太长,那么InRole缓存可能对您更好(您必须进行测试才能确定).

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).

这篇关于如何在Azure中启动ASP.Net状态服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆