微软Azure .NET 4.5的WebForms应用程序:会话超时/是InProc /单实例 [英] Microsoft Azure .NET 4.5 WebForms App : Session TimeOut / InProc / Single Instance

查看:210
本文介绍了微软Azure .NET 4.5的WebForms应用程序:会话超时/是InProc /单实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题所说,这个问题涉及.NET 4.5的WebForms应用。尽管使用一个inproc模式和单一实例而已,我的会话超时的不尊重。

As stated in the title, this questions concerns a .NET 4.5 WebForms App. Despite using an InProc mode and a single instance only, my session timeout is not respected.

<sessionState timeout="240" mode="InProc" customProvider="DefaultSessionProvider">

在上面的例子中,会话仅20分钟后超时。我不使用.NET窗体身份验证。

In the above example, session is timed out after 20 minutes only. I am NOT using .NET forms authentication.

谢谢你的建议。

推荐答案

如果你想保持会话状态,你必须使用下列选项之一

If you want to maintain session state you have to use one of the following options


  • 使用SQL Azure的SQL会话状态提供

  • Azure Table中会话状态

  • 会话状态的Azure与Redis的缓存

您可以找到关于如何做到这一点在下面的链接的详细信息:

You can find details on how to do this at the following links:

  • Session State Management in Windows Azure Web Roles
  • Session state with Azure Redis cache in Azure App Service

在我看来,最简单的方法是在链接上面提到使用Azure的Redis的缓存。

The easiest way in my opinion is using Azure Redis Cache as noted in the link above.

让我知道,如果这有助于!

Let me know if this helps!

这篇关于微软Azure .NET 4.5的WebForms应用程序:会话超时/是InProc /单实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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