How to configure new website to use aspnetdb for membership/login

For ASP.NET 2.0, can create SQL Server 2000 database aspnetdb using aspnet_regsql.exe wizard.
The problem is how to configure a new ASP.NET 2.0 website to recognize this database for membership and login.
Who is Participating?
QPRConnect With a Mentor Commented:
You put the info in your web.config as shown here
you have to configure that in the web.config file
brotherbill999Author Commented:
That was a good start, so now I have a partial victory.

I can build aspnetdb, have passwordFormat="Clear" for clear text passwords, add a user and log in a user.

Here's what I can't do...
  1. Have the LoginStatus correctly indicate log in or log out
  2. Have the LoginName correctly indicate the userid or empty
  3. change the password, minRequiredPasswordLength="4",             minRequiredNonalphanumericCharacters="0", so this is a very lenient password.  It always gripes.
  4. send an email (how do I configure that?).

partial web.config...

            <remove name="LocalSqlServer"/>
            <add name="LocalSqlServer" connectionString="Data Source=BROTHERBILL;Initial Catalog=aspnetdb;User ID=sa;Password=masterkey" providerName="System.Data.SqlClient"/>

            <roleManager enabled="true"/>
            <membership defaultProvider="AspNetSqlMembershipProvider">
                        <remove name="AspNetSqlMembershipProvider"/>
                        <add connectionStringName="LocalSqlServer"
             type="System.Web.Security.SqlMembershipProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Are you using visual studio 2005?
Have you looked at the "login" controls under the toolbox?
brotherbill999Author Commented:
Yes, I am using Visual studio 2005.
And yes, I am using the "login" controls under the toolbox.

And yes, I left something out.
Changed   <authentication mode="Windows"/>   (the default)
to             <authentication mode="Forms"/>

This solved all the problems except where the user requests emailing their password.
In the PasswordRecovery control, set properties: "From" to my email and "Subject" to "Your lost password"

Error when requesting a new password is: "The SMTP host was not specified."
So now the question is: How do I specify the SMTP host for the PasswordRecovery control?

Thank you
QPRConnect With a Mentor Commented:
You would relay the email to an smtp server on your domain (or on the web server itself)
Take a look here...
ki_kiConnect With a Mentor Commented:

                  <smtp from="">
                        <network host=""/>

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.