Sounds like you'll need to create your own Global Application class which inherits from Umbraco Application. From there you'll be able to access session events as per the usual global way. Try the following:
using System;
using Umbraco.Web;
namespace MyApplication
{
public class Global : UmbracoApplication
{
protected void Session_Start(object sender, EventArgs e)
{
// Session start logic here
}
}
}
Umbraco 7 - Global.asax
I am trying to figure out how, in umbraco 7, to add session variables to session_start?
I have done a fair bit of searching and I can't see to find anything that works.
Can someone help me please? Thanks
Chris
Sounds like you'll need to create your own Global Application class which inherits from Umbraco Application. From there you'll be able to access session events as per the usual global way. Try the following:
Hi Dan,
Thanks for your answer, just to be clear does that code need to go into the asax page itself or a new class called global.asax.cs?
Thanks Chris
You'll need to add the second code snippet to a new class file. The first goes in global.asax.
is working on a reply...