B
Balagopal N. Nair
Implementing forms authentication in an ASP.NET is quite easy using cookies.
A few entries in the web.config and a few lines of code and you're done.
The problem hits you when you need to handle roles using the same mechanism.
The SetAuthCookie and RedirectFromLoginPage methods provided by the forms
authentication class do not provide a means to store additional user
information in the cookie except for the username.
The solution I have provided in the below link allows you to leverage the
capability of cookies to store other user data where in you can store the
roles of the user separated by coma.
http://code.msdn.microsoft.com/nbalagopal
Check it out.
A few entries in the web.config and a few lines of code and you're done.
The problem hits you when you need to handle roles using the same mechanism.
The SetAuthCookie and RedirectFromLoginPage methods provided by the forms
authentication class do not provide a means to store additional user
information in the cookie except for the username.
The solution I have provided in the below link allows you to leverage the
capability of cookies to store other user data where in you can store the
roles of the user separated by coma.
http://code.msdn.microsoft.com/nbalagopal
Check it out.