brotherbill999
asked on
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.
The problem is how to configure a new ASP.NET 2.0 website to recognize this database for membership and login.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you have to configure that in the web.config file
ASKER
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", minRequiredNonalphanumeric Characters ="0", so this is a very lenient password. It always gripes.
4. send an email (how do I configure that?).
partial web.config...
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=BROTHERBILL;Initial Catalog=aspnetdb;User ID=sa;Password=masterkey" providerName="System.Data. SqlClient" />
</connectionStrings>
<system.web>
<roleManager enabled="true"/>
<membership defaultProvider="AspNetSql Membership Provider">
<providers>
<remove name="AspNetSqlMembershipP rovider"/>
<add connectionStringName="Loca lSqlServer "
name="AspNetSqlMembershipP rovider"
enablePasswordRetrieval="t rue"
enablePasswordReset="false "
applicationName="/"
requiresUniqueEmail="false "
passwordFormat="Clear"
maxInvalidPasswordAttempts ="5"
minRequiredPasswordLength= "4"
minRequiredNonalphanumeric Characters ="0"
passwordAttemptWindow="10"
passwordStrengthRegularExp ression=""
requiresQuestionAndAnswer= "false"
type="System.Web.Security. SqlMembers hipProvide r, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d 50a3a"/>
</providers>
</membership>
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. send an email (how do I configure that?).
partial web.config...
<connectionStrings>
<remove name="LocalSqlServer"/>
<add name="LocalSqlServer" connectionString="Data Source=BROTHERBILL;Initial
</connectionStrings>
<system.web>
<roleManager enabled="true"/>
<membership defaultProvider="AspNetSql
<providers>
<remove name="AspNetSqlMembershipP
<add connectionStringName="Loca
name="AspNetSqlMembershipP
enablePasswordRetrieval="t
enablePasswordReset="false
applicationName="/"
requiresUniqueEmail="false
passwordFormat="Clear"
maxInvalidPasswordAttempts
minRequiredPasswordLength=
minRequiredNonalphanumeric
passwordAttemptWindow="10"
passwordStrengthRegularExp
requiresQuestionAndAnswer=
type="System.Web.Security.
</providers>
</membership>
Are you using visual studio 2005?
Have you looked at the "login" controls under the toolbox?
Have you looked at the "login" controls under the toolbox?
ASKER
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
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
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.