Jova
Jova

Reputation: 153

Can I create an ASP.NET website with users without using MembershipProvider?

Is it possible to have an ASP.NET website which allows users to register and login, without using a MembershipProvider?

And instead just work directly towards custom database tables which stores user information?

Upvotes: 1

Views: 127

Answers (3)

citronas
citronas

Reputation: 19365

Yey you can. Have a look at the FormsAuthentication class, specifically at the Authenticate, Signout and Session.Abandon Methods. You can write your own user privilege system in probably less time than you expect.

Upvotes: 1

Adam Pope
Adam Pope

Reputation: 3274

Absolutely. You can just do everything yourself. Although, I would question whether that is the best approach to take as it means doing a lot more work yourself when you can use what comes out of the box. Unless you have some special requirements?

Upvotes: 1

Russ Cam
Russ Cam

Reputation: 125528

You can, but why not use the MembershipProvider or your own bespoke Membership provider? It removes the need to think about how to code a lot of the details and is baked into the platform for this purpose. It is really quite straightforward to implement one and you need only override the methods that you need.

Upvotes: 2

Related Questions