My application will serve multiple sites, i will define the same home directory for all the sites in the system. Assume this is a business application with users, roles etc and each site is for another customer.
The role definitions are in DB, so i am creating a forms auth cookie with a ticket and name that cookie as
FormsAuthentication.FormsCookieName + HttpContext.Current.Session["ApplicationName"]
But when i try to decode this cookie in Application_AuthenticateRequest, application throws an error saying session state is not ready.
I can store "ApplicationName" data in another way. But i have a feeling that i might be doing something wrong from the begining.
Can you suggest me a pattern or something on this scenario?