Role management using cookies

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top