Forms Authentication – Creating Users
Last week we installed the tables into our database and set up the database connection so that we could implement forms based authentication.
This week, we need to put into place a way of creating users for our system. The easiest way to do that is to create a form that allows our user to sign up.
You might think that you could just use the configuration tool that is in Visual Studio, but my experience is that if you use that tool and then move the database to another server, it doesn’t always work correctly.
But creating a sign-up screen isn’t that hard.
You’ll want to create a new form in your application. You’ll probably call it sign up.
In your Visual Studio 2008 toolbox, you’ll notice a section of tools called “Login.” Expand that and drag and drop the “Create User Wizard” control onto the screen.
Since your application is already set to connect to the database where the information is stored, that’s all you HAVE to do.
But you can tweak the layout and some of the controls.
For example, you’ll notice in the properties window that you can change the content of many of the controls within the “Create user Wizard” control. You can change the buttons from normal windows buttons to images or hyperlinks. You can eliminate asking for a password by setting the AutoGeneratePassword property to true.
But you have even more control. If you want to completely change the layout, you can create templates for each of the steps and change the placement and add new controls. Of course, if you add a new control, you’ll need to trap that information and store it yourself. But it can be done by trapping an appropriate event and processing it there. I can’t tell you exactly which one because your circumstances may be different, but a few that might work for you in your situation are the CreatingUser event, NextButtonClick event, or the FinishButtonClick event.
Other post in forms authentication
- WordPress w/ Forms Authentication on IIS6 - May 21st, 2008
- Setting Up Your Forms Based Authentication Database - September 14th, 2009
- Forms Authentication – Creating Users - September 21st, 2009
- Forms Authentication – Managing Users - September 28th, 2009
- Forms Authentication – Manual Authentication - October 5th, 2009
- Determine The Role of a User in ASP.NET - October 13th, 2009
- ASP.NET Assigning a Role to a User - October 19th, 2009
- Authentication - Assigning Permissions to Roles - October 26th, 2009
Other Related Items:
Head First iPhone Development: A Learner's Guide to Creating Objective-C Applications for the iPhoneLet's say you have an idea for a killer iPhone app. Where do you begin? Head First iPhone Development will help you get your first application up and... Read More >
Sexy Web Design: Creating Interfaces That WorkSexy Web Design is an easy-to-follow guide that reveals the secrets of how to build your own breathtaking web interfaces from scratch. You'll be gu... Read More >










