Login not working but New account logs user in

Discussion in 'ASP .Net Security' started by Kirk Groome, Jan 18, 2006.

  1. Kirk Groome

    Kirk Groome Guest

    Hi all,

    I'm working on a web site and I would like to use the VS login controls. The
    problem I'm having is that when I create a new user all works fine. The user
    gets added to the database and is logged in to the web site. the problem is
    when you leave the web site you can not login again. I get a message " Your
    login attempt was not successful. Please try again.".
    I have a form where I have added the LogIn, LoginStatus, LoginName, and
    CreateUserWizard. I'm not using the SQL express database but a SQL 2000
    database.
    I have checked the database and the user info is getting added to the table
    aspnet_users table. below is my web.config file.
    Any ideas on why a user can not log in would greatly help me out.

    Thanks
    Kirk Groome


    <?xml version="1.0"?>
    <configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
    <appSettings/>
    <connectionStrings>
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString="Data
    Source=mssql9.XXXX.com;Initial Catalog=MicroWe_vs1;Persist Security
    Info=True;User ID=MicroWe_kirk1;Password=XXXXXX"
    providerName="System.Data.SqlClient"/>
    </connectionStrings>
    <system.web>
    <roleManager enabled="true"/>
    <compilation debug="true" strict="false" explicit="true"/>
    <pages>
    <namespaces>
    <clear/>
    <add namespace="System"/>
    <add namespace="System.Collections"/>
    <add namespace="System.Collections.Specialized"/>
    <add namespace="System.Configuration"/>
    <add namespace="System.Text"/>
    <add namespace="System.Text.RegularExpressions"/>
    <add namespace="System.Web"/>
    <add namespace="System.Web.Caching"/>
    <add namespace="System.Web.SessionState"/>
    <add namespace="System.Web.Security"/>
    <add namespace="System.Web.Profile"/>
    <add namespace="System.Web.UI"/>
    <add namespace="System.Web.UI.WebControls"/>
    <add namespace="System.Web.UI.WebControls.WebParts"/>
    <add namespace="System.Web.UI.HtmlControls"/>
    </namespaces>
    </pages>
    <membership>
    <providers>
    <remove name="AspNetSqlMembershipProvider"/>
    <add name="AspNetSqlMembershipProvider"
    type="System.Web.Security.SqlMembershipProvider, System.Web,
    Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    connectionStringName="LocalSqlServer" applicationName="/"
    enablePasswordReset="true" enablePasswordRetrieval="false"
    maxInvalidPasswordAttempts="10" minRequiredPasswordLength="1"
    minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
    passwordStrengthRegularExpression="" passwordFormat="Hashed"
    requiresQuestionAndAnswer="true" requiresUniqueEmail="true"/>
    </providers>
    </membership>
    <!--
    The <authentication> section enables configuration
    of the security authentication mode used by
    ASP.NET to identify an incoming user.
    -->
    <authentication mode="Forms"/>
    <!--
    The <customErrors> section enables configuration
    of what to do if/when an unhandled error occurs
    during the execution of a request. Specifically,
    it enables developers to configure html error pages
    to be displayed in place of a error stack trace.

    <customErrors mode="RemoteOnly"
    defaultRedirect="GenericErrorPage.htm">
    <error statusCode="403" redirect="NoAccess.htm" />
    <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    -->
    </system.web>
    </configuration>
    Kirk Groome, Jan 18, 2006
    #1
    1. Advertising

  2. Kirk Groome

    MikeS Guest

    Maybe try adding a defaultProvider attribute to the membership tag and
    set the provider property on the login control.

    You might want to break somewhere and see what these defaults are
    ending up as.

    Membership.Provider.Name
    TypeName(Membership.Provider)

    Maybe also see that the membership user isApproved and not being
    created disabled.
    MikeS, Jan 22, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lawrance
    Replies:
    0
    Views:
    434
    Lawrance
    Nov 30, 2003
  2. Kirk Groome
    Replies:
    1
    Views:
    477
    =?Utf-8?B?RFdT?=
    Jan 26, 2006
  3. Tony Johansson
    Replies:
    3
    Views:
    16,090
    Patrice
    Jan 2, 2010
  4. Jack
    Replies:
    1
    Views:
    696
  5. Miguelon cosapi data

    Login IP remote in the logs Log4J

    Miguelon cosapi data, Nov 28, 2006, in forum: Ruby
    Replies:
    1
    Views:
    244
    Miguelon cosapi data
    Nov 28, 2006
Loading...

Share This Page