Link to home
Start Free TrialLog in
Avatar of Mike_Stevens
Mike_StevensFlag for United States of America

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.TextEditor1.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?
Avatar of Johny Bravo
Johny Bravo

Hi,

Can you post you web.config

Please check
<membership defaultProvider="YourMembershipProvider" hashAlgorithmType="SHA1"/>
Avatar of Mike_Stevens

ASKER

<membership defaultProvider="MySqlMembershipProvider">
      <providers>
        <clear/>
        <add name="MySqlMembershipProvider"
             connectionStringName="LocalSQLServer"
             maxInvalidPasswordAttempts="10"
             applicationName="Dept_Public_Service"
             enablePasswordRetrieval="true"
             enablePasswordReset="true"
             requiresQuestionAndAnswer="false"
             requiresUniqueEmail="true"
             minRequiredPasswordLength="6"
             minRequiredNonalphanumericCharacters="0"
             type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
            passwordFormat="Clear"/>
      </providers>
    </membership>
ASKER CERTIFIED SOLUTION
Avatar of Mike_Stevens
Mike_Stevens
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I solved my own problem