Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

How can Site.Master access a variable created by Global.asax?

I have a variable I'd like to create in the Global.asax file that I then want to access from the Site.Master file.  How can I do that?  

Thanks,
newbieweb
SOLUTION
Avatar of Paul Jackson
Paul Jackson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of curiouswebster

ASKER

I get this exception:
"Session state is not available in this context." when I try this first step...

            Session["RDDBAdminDataStore"] = rddbAdminDataStore;
            Session["AppPermissions"] = appPermissions;


Do I first need to create a Session variable?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Both the

Context.Session

and the

HttpContext.Current.Session

are null in Global.Application_Start()
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks.