我开发ios程序,我使用asp网络会话系统。问题是当我关闭程序时,会话正在删除!我该如何处理?
代码部分: protected void Page_Load(object sender,EventArgs e) { Response.Headers.Add(" Content-type"," text / json"); Response.Headers.Add(" Content-type"," application / json"); string b = Request.QueryString [" routeFunc"];
if (b != "user/login")
{
Dictionary<string, string> userData = (Dictionary<string, string>)Session["userData"];
if (userData == null)
{
userData = new Dictionary<string, string>();
userData.Add("false", "0");
echo(JsonConvert.SerializeObject(userData));
return;
}
else
{
Session["userData"] = c_mysql.FindOne("users", "id", userData["id"]);
userData = (Dictionary<string, string>)Session["userData"];
c_user.userData = userData;
c_user.notificationCenter.userData2 = userData;
}