Session is null in ashx handler解决办法

<% @ webhandler language="C#" class="DownloadHandler" %>

using System;
using System.Web;
using System.Web.SessionState;

public class DownloadHandler : IHttpHandler, IReadOnlySessionState
{
   public bool IsReusable { get { return true; } }
   
   public void ProcessRequest(HttpContext ctx)
   {
       ctx.Response.Write(ctx.Session["hello"]);
   }
}


posted on 2008-09-08 21:30  sky老杨  阅读(348)  评论(0编辑  收藏  举报

导航