读书人

webserver中施用session

发布时间: 2013-09-06 10:17:17 作者: rapoo

webserver中使用session
Random rnd = new Random();
int n = rnd.Next(100000, 999999);
try
{
// Session["code"] = n.ToString();
//Session.Add("code", n.ToString());
Session["code"] = "123123";
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
return isbool;
}


session老报“未将对象引用设置到对象实例”?
[解决办法]
[WebMethod(EnableSession = true)]
[解决办法]
有调试没?是走到哪里报的这个错?

读书人网 >asp.net

热点推荐