G
Guest
Hi,
I want to add a an object to a Session in my global.asax.cs but am unable.
I try to do below in my Application_AuthenticateRequest
Session.Add("Employee", employee);
and I get an error stating "Session state is not available in this context. "
I have the following imports in my global.asax
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.Security;
using System.Runtime.InteropServices;
using System.Security.Principal;
using eircomSAM.DomainLayer.People;
Any ideas as to what I am doing wrong?
I want to add a an object to a Session in my global.asax.cs but am unable.
I try to do below in my Application_AuthenticateRequest
Session.Add("Employee", employee);
and I get an error stating "Session state is not available in this context. "
I have the following imports in my global.asax
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.Security;
using System.Runtime.InteropServices;
using System.Security.Principal;
using eircomSAM.DomainLayer.People;
Any ideas as to what I am doing wrong?