Fixed a bug with session

main
Inga 🏳‍🌈 15 years ago
parent e89435944f
commit e1fc83ad52
  1. 2
      Builder/IISMainHandler/build.txt
  2. 2
      Builder/IISUploadHandler/build.txt
  3. 6
      IISMainHandler/WebContext.cs

@ -91,10 +91,12 @@ namespace FLocal.IISHandler {
HttpCookie sessionCookie = this.httprequest.Cookies["session"];
if(sessionCookie != null && sessionCookie.Value != null && sessionCookie.Value != "") {
try {
this.session = Session.LoadByKey(sessionCookie.Value);
var session = Session.LoadByKey(sessionCookie.Value);
var tmp = session.account;
sessionCookie.Expires = DateTime.Now.AddDays(3);
this.session.updateLastActivity();
session.updateLastActivity();
this.httpresponse.AppendCookie(sessionCookie);
this.session = session;
} catch(NotFoundInDBException) {
sessionCookie.Value = "";
sessionCookie.Expires = DateTime.Now.AddDays(-1);

Loading…
Cancel
Save