In web application [asp.net] shall we write code that can retrive data from datbase or insert something in database. in any event of global.asax. when i am writing code in “Application_BeginRequest” even like :
Session[“abc”]= 10; it is throwing exception that session can’t declare some thing.Session state is not available in this context.
Oh. You need to read about ASP.NET page cycle
Then You will realize that Session state is not available on BeginRequest