在一般处理程序中使用session

public class Handler1 : IHttpHandler, IRequiresSessionState

需要继承 IRequiresSessionState接口,告诉程序要使用session!

System.Web.HttpContext.Current.Session["userinfo"];
原文地址:https://www.cnblogs.com/vichin/p/7695780.html