在webService里面Session默认是不可用的,必须得开启Session才能使用,如
[WebMethod(EnableSession = true)]
public string Login(string name)
{
    Context.Session["name"] = name;
    return name;
}
需要在当前方法上启用Session  [WebMethod(EnableSession = true)]

 

另外参见

http://www.cnblogs.com/hoojo/archive/2011/03/16/1985699.html

相关文章:

  • 2021-05-29
  • 2021-06-26
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
  • 2021-12-11
猜你喜欢
  • 2021-09-07
  • 2022-12-23
  • 2021-12-18
  • 2022-01-21
  • 2021-06-24
相关资源
相似解决方案