c# - IIS 7.0 asp.net session 超时

标签 c# asp.net iis ssl

我有以下请求: 我有一个包含 2 个区域的网站

1) public - session is set for 10 minutes dynamically in code (during page request processing)
2) private - session is set for one hour dynamically in code (during page request processing)

我的问题是我有 2 个表现不同的环境:

  1. Development environment - reacts as expected (public and private areas have the definitions that were defined by code).
  2. Production environment - all areas have 15 (or 20) minutes session timeout (the timing depends on which server I define the environment).

根据描述,我了解到代码本身并不是必需的。

现在,这两个环境之间的唯一区别是生产环境具有 SSL 加密。

我需要添加什么才能使两个环境表现相同? 提前致谢。

最佳答案

检查 IIS 本身的设置。我相信默认值为 20 分钟,这可以解释为什么您会看到您所看到的内容。

  • Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see Open IIS Manager (IIS 7).
    For information about navigating to locations in the UI, see
    Navigation in IIS Manager (IIS 7).

  • In Features View, double-click ASP.

  • On the ASP page, under Services, expand Session Properties.

  • In the Time-out field, enter a time-out value in the format hh:mm:ss. For example, enter 00:15:00 for 15 minutes.

  • In the Actions pane, click Apply.

来自: http://technet.microsoft.com/en-us/library/cc725820(v=ws.10).aspx

关于c# - IIS 7.0 asp.net session 超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11410498/

相关文章:

c# - 使用 POCO 延迟加载的存储库模式

asp.net - 是什么导致 IIS 7.5 上传递静态文件时出现 404.4?

c++ - 在 asp.net 中使用 c++ dll - 异常 :Could not load file or assembly

php - 如何使用 OpenOffice 从我的 PHP 网页将 RTF 转换为 PDF?

python - IIS : django. core.exceptions.AppRegistryNotReady 上的 Django:应用程序尚未加载

c# - 如何以编程方式判断是否在 .NET ListView 中单击了组 header ?

c# - 如何为类创建对象并在一行中使用其功能

c# - LINQ让重复数据

asp.net - (0..1---*) 在实体关系图/实体数据模型 (.edmx) 中是什么意思

iis - 将 MIME 类型永久添加到 IIS