3

I want to use forms authentication on my ASP.NET MVC site. All I need is a place for users to login, a page to add a user, and a page to edit a user.

I'm using all the default ASP.NET forms authentication tables for SQL Server (aspnet_Profile, aspnet_Roles, aspnet_Users, etc.). The only difference is that I've added an Employees table to my database, which contains a FK to aspnet_Users to create a one-to-one relationship. The Employees table contains columns for FirstName, LastName, StartDate, etc. It's a way for me to keep additional information for the users.

I'm having trouble finding any sort of tutorial that would help me build a basic page in MVC, everything I find is for WebForms. For my page to add a user, I'd like there to be fields for the Employees table. I don't know if I can modify the CreateUserWizard to add those fields, or if I'd be better off just creating my own custom page.

Can anyone lead me in the right direction?

2 Answers 2

2

There are tutorials on ASP.NET MVC here:
http://www.asp.net/mvc

The "build your first" tutorial covers all the MVC basics, including authentication. Once you go through that, you can link your Employee tables to the Membership tables and you'll have learned how to deliver that data to an MVC View.

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

Comments

1

The MVC Membership Starter Kit is a good place to start: https://github.com/TroyGoode/MembershipStarterKit

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.