Azure 中的 ASP.NET 会话状态提供程序

发布于 2024-10-16 15:00:26 字数 258 浏览 8 评论 0原文

据我所知,目前的情况是这样的:

  1. 使用 SQL 会话状态提供程序是可能的(正如我在某处读到的),但 Microsoft 不支持它。所以它将来可能会停止工作。它还需要一个 WorkerRole 来删除过时的数据。
  2. Azure AppFabric 缓存服务仍处于 CTP 中。
  3. TableStorageSessionProvider 是 Azure 培训工具包中的一段代码,不建议用于生产代码。

你会选择什么?

As far as I know, the current situation is this:

  1. Use SQL session state provider is possible (as I've read somewhere) but it's not supported by Microsoft. So it could stop working in the future. Also it needs a WorkerRole to delete the outdated data.
  2. Azure AppFabric Caching Service is still in CTP.
  3. TableStorageSessionProvider is a piece of code in the Azure training kit that is not recommended for production code.

What would you choose?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

木緿 2024-10-23 15:00:26

如果您本周上线,我会推荐 SQL Azure 会话状态提供程序。 这里有一篇出色的博客文章,提供了所有内容您需要。

您是对的,Azure 并未正式支持此解决方案。不过,目前它应该可以正常工作,并且一旦上线,您可以轻松地转向 Azure AppFabric 缓存(如 Igor 的建议)。

**编辑 2014 年 6 月 16 日 ** 请参阅 Azure Redis 缓存(预览版) ) 15 分钟内使用 Azure Redis 缓存的 MVC 电影应用程序

编辑 2012 年 5 月 23 日 自此回答以来发生了很多变化。自 2011 年 8 月起,SQL Azure 中的缓存通过通用提供程序得到正式支持。有关更多信息,请参阅博客邮政。 100MB 数据库的起价为 4.99 美元。

AppFabric 缓存于 2011 年 5 月上线。缓存起价 128MB,售价 45 美元。 AppFabric 缓存的详细信息位于此处。请注意,交易数量、连接数量和带宽(以及存储容量)存在每小时配额。

编辑 2012 年 6 月 7 日 另一项更新:在 2012 年春季版本中,现在还可以使用现有 Web 或 Worker 角色中一定比例的 RAM 创建缓存(无需任何成本)作为新的缓存角色,在您的部署中创建专用高速缓存(用于实例成本)。 Scott Guthrie 在此处发表了相关博客< /a>.新的 v1.7 SDK 中提供了这些功能。

If you're going live this week, I'd recommend the SQL Azure session state provider. There's an excellent blog post here that provides everything you'll need.

You're correct in that this solution isn't officially supported by Azure. However, it should work fine for now, and you can very easily shift to Azure AppFabric Caching (as suggested by Igor) once that goes live.

**EDIT 6/16/2014 ** See Azure Redis Cache (Preview) ASP.NET Session State Provider section of MVC movie app with Azure Redis Cache in 15 minutes

EDIT 5/23/2012 Lots of changes since this answer. As of August 2011, cache in SQL Azure is officially supported, via Universal Providers. See more info on this blog post. Pricing starts at $4.99 for a 100MB database.

AppFabric Cache is live as of May, 2011. Cache starts at 128MB for $45. Details of the AppFabric Cache are here. Note that there are hourly quotas in place on number of transactions, number of connections, and bandwidth (as well as storage capacity).

EDIT 6/7/2012 Yet another update: With the Spring 2012 release, there's now the ability to create a cache using a percentage of RAM in your existing Web or Worker roles (costing nothing), as well as a new Cache Role to create dedicated high-speed cache within your deployment (for the cost of the instances). Scott Guthrie blogged about it here. These features are available in the new v1.7 SDK.

骄兵必败 2024-10-23 15:00:26

恕我直言:Azure AppFabric 缓存服务。从战略上讲,这是他们要去的地方,他们很可能会在你完成开发之前完成它。

IMHO: Azure AppFabric Caching Service. It's strategically where they're going and they'll likely be done with it before you finish development.

只怪假的太真实 2024-10-23 15:00:26

正如我在上面的评论中提到的,AppFabric 缓存现已投入生产。详细信息(包括定价和 SLA)位于此处。产品版本的亮点:

  • 在所有数据中心都
  • 可用 能够使用 128MB 到 4GB 的
  • 缓存 事务 SLA(每秒缓存事务数)

通过门户,创建缓存命名空间后,只需单击生成 web.config 的按钮/app.config 您复制粘贴的片段。就是这么简单。

As I mentioned in a comment above, the AppFabric Cache is now live, in production. Details, including pricing and SLA, are here. Highlights of the production release:

  • Availability in all data centers
  • Ability to consume cache from 128MB to 4GB
  • Transactional SLA (# of cache transactions per second)

Through the portal, once you create your cache namespace, you simply click a button that generates web.config/app.config snippets that you copy 'n' paste. It's that simple.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文