【问题标题】:session in httphandlerhttphandler 中的会话
【发布时间】:2011-11-14 11:35:43
【问题描述】:

我在 2 个 http 处理程序中使用会话,还添加了 IRequiresSessionState , IReadOnlySessionState

Imports System.Web.SessionState
Public Class Handler : Implements IHttpHandler , IRequiresSessionState , IReadOnlySessionState 

在 http 处理程序 1 中创建会话

context.Session("id") = "1"

并在 http 处理程序 2 中访问会话

Dim i As String = CStr(context.Session("id"))

这里的问题是 http handler 2 session("id") = nothing

为什么???

【问题讨论】:

    标签: asp.net httphandler


    【解决方案1】:

    删除IReadOnlySessionState

    【讨论】:

      猜你喜欢
      • 2012-11-29
      • 2011-04-07
      • 2011-04-01
      • 2010-12-06
      • 1970-01-01
      • 2010-11-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多