2

I just started learning about ASP.NET, and I have a couple of questions.

Am I required to use the ASP.NET login control for a secure log in? If not, can I do it the old-fashioned way, with calls to a MySQL DB? If so, how do I keep track of which users are logged in, and how do I restrict access?

I've tried googling but everything is on the asp.net login control.

1

2 Answers 2

5

There's too many ways not to get this right - sure you can use your own UI controls for login, but you should not roll the backend / infrastructure for this on your own. Stick with the Membership authentication if you can, this should work well for you - there is no reason to re-invent the wheel if you do not have requirements that cannot be met by Membership authentication.

Also there is a Membership provider for MySQL you can use, i.e. see here.

Sign up to request clarification or add additional context in comments.

1 Comment

I agree 100% - only roll your own if the app requirements REQUIRE a feature that is not supported by the Framework implementation. Good answer!
3

I recommend reading through Scott Mitchell's "Examining ASP.NET's Membership, Roles, and Profile" series. This will definitely give you the information you need to implement your own login control and membership provider (using MySQL or any other data store you want).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.