I develop ios program and i use asp net session system.The problem is when i close program,session is deleting!how can i handle with this?
Code section: 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;
}