Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Edgar Arroyo 19 posts 161 karma points
    Dec 02, 2019 @ 04:22
    Edgar Arroyo
    0

    Umbraco 8.4-rc and global.asax

    I am using global.asax on Umbraco 8.4-rc (just updated) and it seems like it's not triggering "Session_Start" when I go to the website.

    protected void Session_Start(object sender, EventArgs e)
        {
            Session["Date"] = DateTime.Today.Year.ToString() + "-" + DateTime.Today.Month.ToString() + "-" + DateTime.Today.Day.ToString();
            Session["Date1"] = DateTime.Today.Year.ToString() + "-" + DateTime.Today.Month.ToString() + "-" + DateTime.Today.Day.ToString();
            Session["Date2"] = DateTime.Today.Year.ToString() + "-" + DateTime.Today.Month.ToString() + "-" + DateTime.Today.Day.ToString();
            LoadList();
            GC.Collect();
        }
    

    Sessions are not being set and function is not being called, reason why I suspect it's not calling "Session_Start"

  • Edgar Arroyo 19 posts 161 karma points
    Dec 02, 2019 @ 04:28
    Edgar Arroyo
    0

    Well, decided to "View Markup" and the update overwrote my global.asax

    I had to add "CodeBehind" and change the "Inherits" for it to work again.

    Should this be reported as a bug?

  • Mike Chambers 635 posts 1252 karma points c-trib
    Dec 02, 2019 @ 10:07
    Mike Chambers
    0

    Think the recommended approach is via composers now?

    https://our.umbraco.com/documentation/implementation/composing/

  • Edgar Arroyo 19 posts 161 karma points
    Dec 02, 2019 @ 14:39
    Edgar Arroyo
    0

    For what I need to do (set 6 sessions, 3 are simple, 3 are SQL query populated) I find it very easy to use "Session_Start"

    Would "Composing" be easier/simpler? Any examples of this simple task (setting sessions?) Maybe I will switch if I find it easier...

    Thanks.

Please Sign in or register to post replies

Write your reply to:

Draft