首先引用 using System.Web.SessionState;
然后继承接口IRequiresSessionState 就能使用session了
public void ProcessRequest(HttpContext context)
{
int isre = bpmsuserbll.UserLogin(Account, Pwd);
if (isre > 0)
{
context.Session["BPMSUserid"] = isre;
Msg = "登录成功";
}
}