Roles for "Hhtpcontext.user" in Asp.net Formauthentication
- by Hemant Kothiyal
In asp.net global.asax, where should i write code to assign role in httpcontext.user?
What i have read in site is that it should be part of "Application_onPostauthentication" event of global.asax but i am not getting that if i write there then it is execute for each request of user. I think this should fetch one for one authentication at session.
I don't know even why microsoft also suggest to write code there? Please if anybody know the fact make me clear?