实现IHttpHandler接口的同时必须继承IRequiresSessionState接口,才能拿到session
public class HttpHandler: IHttpHandler, IRequiresSessionState { public void ProcessRequest(HttpContext context) { string session=context.Session["NAME"].ToString(); }
时间: 2024-10-13 23:28:37