2

I am trying to use ASP.NET forms authentication functionality but it is not possible for me to add every member to the web config file because there may be thousands using the application. I was just wondering is it possible to do the following all within form authentication?

  1. User signs in.
  2. Flag the user to be authorized.
  3. Allow access.
2
  • Where do you keep your users data? Commented May 10, 2012 at 9:18
  • Hi, I store it in a database but I use a separate entity framework to connect. Thanks for the help i think i can take it from here. Commented May 10, 2012 at 9:31

2 Answers 2

3

Use MemebrshipProvider infrastructure.

You can use existing SqlMemebrshipProvider (it uses dedicated SQL DB to keep the data) or roll your own inheriting the base class.

Then install it in Web.config (as described in the same article at the bottom).

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

Comments

2

You can Use Membership provider, with the create user method. Membershipprovider.createuser

pseudocode for creating

Membership.CreateUser(
 username, password, email,
question, answer, isApproved,
 out flag);
if(flag== MembershipCreateStatus.Success)
    {
// success!  

    }

and also you can refer this link to implement

  1. Membership providers
  2. Membership, Roles, Profiles
  3. Custom Membership provider

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.