Forms Authentication – Creating Users

ppl-men-060

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.

Related Post

  • Forms Authentication – Managing UsersForms Authentication – Managing Users While there are a lot of controls available in ASP.NET that allow you to manage forms authentication, one control that doesn’t exist is something that will allow you to manage your user list. M...
  • DotNetNuke Modules – Creating Base ModulesDotNetNuke Modules – Creating Base Modules Now that we have DotNetNuke installed into Visual Studio we can go ahead and create our first modules. Actually, creating the modules is pretty simple. But it is even easier to do it wrong, which...
  • WordPress w/ Forms Authentication on IIS6WordPress w/ Forms Authentication on IIS6 I know I said yesterday that I'd start a series about creating DotNetNuke modules, but I solved a problem yesterday after I wrote that post that I think a lot of you will be interested in.  Es...
  • Setting Up Your Forms Based Authentication DatabaseSetting Up Your Forms Based Authentication Database I was recently asked if I would cover some topics related to Forms Based Authentication.  The person who requested this information has some specific issues that he wants covered that I won’...
  • The Google Appliance and Forms AuthenticationThe Google Appliance and Forms Authentication I’ve been working with a client to implement the Google Appliance on one of their sites that has forms authentication enabled. For those of you who aren’t aware, Google provides a box that y...