Home » Archive by category "forms authentication"

Determine The Role of a User in ASP.NET


There are several controls that allow you to display content based on the role a user is in, including:

– LoginView
– LoginStatus

And the web.config file allows us to control which pages can be viewed based on which role a user is in.

But what if you need to determine the role a user is in using the APIs? How do you do that?

It turns out that the API for this is really rather straightforward.

Continue reading “Determine The Role of a User in ASP.NET”

Forms Authentication – Manual Authentication


I’ve had several occasions in the past where I’ve needed to do my own authentication or I’ve needed to add some additional methods to the authentication process.

As easy as Microsoft has made the authentication process, you might think that in order to  manually authenticate you’d need to write all of your authentication code manually.  But nothing could be farther from the truth.

In fact, most of the time all you need to do is trap an event handler in the existing login control.

Continue reading “Forms Authentication – Manual Authentication”

Setting Up Your Forms Based Authentication Database


I was recently asked if I would cover some topics related to Forms Based Authentication.  The person who requested this information has some specific issues that he wants covered that I won’t be covering for a while because I think there are some other issues that need to be covered first.

One of those is setting up the database.

When I owned my hosting companies, I saw more confusion in this area than just about any other topic that came up.

So here’s the step-by-step process you need to go through to set up your database for Forms Based Authentication.

Continue reading “Setting Up Your Forms Based Authentication Database”