Mike_Stevens
asked on
Problem using asp.net membership
I am trying to create a login in page for a asp.net site. I created my own login page and am trying to validate the user by using the following code:
If Membership.ValidateUser(Me .TextEdito r1.Text, Me.TextEditor2.Text) = True Then
Me.Login_Message.Text = "Login ok"
Else
Me.Login_Message.Text = "Not good"
End If
Me.TextEditor1.Text is the username and Me.TextEditor2.Text is the password
I have one test user account i created using the create user wizard in the database. But when i use the about code to validate the user it tells me the user account is no good. I even drop a login control on the form and it still does not work.
What am i missing?
If Membership.ValidateUser(Me
Me.Login_Message.Text = "Login ok"
Else
Me.Login_Message.Text = "Not good"
End If
Me.TextEditor1.Text is the username and Me.TextEditor2.Text is the password
I have one test user account i created using the create user wizard in the database. But when i use the about code to validate the user it tells me the user account is no good. I even drop a login control on the form and it still does not work.
What am i missing?
ASKER
<membership defaultProvider="MySqlMemb ershipProv ider">
<providers>
<clear/>
<add name="MySqlMembershipProvi der"
connectionStringName="Loca lSQLServer "
maxInvalidPasswordAttempts ="10"
applicationName="Dept_Publ ic_Service "
enablePasswordRetrieval="t rue"
enablePasswordReset="true"
requiresQuestionAndAnswer= "false"
requiresUniqueEmail="true"
minRequiredPasswordLength= "6"
minRequiredNonalphanumeric Characters ="0"
type="System.Web.Security. SqlMembers hipProvide r, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d 50a3a"
passwordFormat="Clear"/>
</providers>
</membership>
<providers>
<clear/>
<add name="MySqlMembershipProvi
connectionStringName="Loca
maxInvalidPasswordAttempts
applicationName="Dept_Publ
enablePasswordRetrieval="t
enablePasswordReset="true"
requiresQuestionAndAnswer=
requiresUniqueEmail="true"
minRequiredPasswordLength=
minRequiredNonalphanumeric
type="System.Web.Security.
passwordFormat="Clear"/>
</providers>
</membership>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I solved my own problem
Can you post you web.config
Please check
<membership defaultProvider="YourMembe