Login Failed after running aspnet_regsql

Discussion in 'ASP .Net' started by cs_in_va, Mar 7, 2008.

  1. cs_in_va

    cs_in_va Guest

    I ran aspnet_regsql to create the membership tables in my current
    database (ADAHSystem), however, now when I try to configure the user
    accounts I get, "Cannot open user default database. Login failed." I
    have done some googling and found in the the examples I see something
    like this:

    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer"
    connectionString="server=.;database=aspnetdb;integrated
    security=sspi;"/>

    In my web config I have this for my database:

    <add name="csADAHSystem"
    connectionString="Data Source=CHRIS-PC;Initial
    Catalog=ADAHSystem;Persist Security Info=True;User
    ID=XXXXXXXXXX;Password=XXXXXXX"
    providerName="System.Data.SqlClient"/>

    This is setup the same as I have on my Godaddy account. The connection
    string works fine on my web pages, but does not work for the
    membership information.

    Then when I go to provide I only see: AspNetSqlProvider

    I click test and then I get: " Could not establish a connection to the
    database. If you have not yet created the SQL Server database, exit
    the Web Site Administration tool, use the aspnet_regsql command-line
    utility to create and configure the database, and then return to this
    tool to set the provider. " Which I have already run.
    cs_in_va, Mar 7, 2008
    #1
    1. Advertising

  2. cs_in_va

    cs_in_va Guest

    On Mar 7, 12:12 pm, cs_in_va <> wrote:
    > I ran aspnet_regsql to create the membership tables in my current
    > database (ADAHSystem), however, now when I try to configure the user
    > accounts I get, "Cannot open user default database. Login failed." I
    > have done some googling and found in the the examples I see something
    > like this:
    >
    > <remove name="LocalSqlServer"/>
    > <add name="LocalSqlServer"
    > connectionString="server=.;database=aspnetdb;integrated
    > security=sspi;"/>
    >
    > In my web config I have this for my database:
    >
    > <add name="csADAHSystem"
    > connectionString="Data Source=CHRIS-PC;Initial
    > Catalog=ADAHSystem;Persist Security Info=True;User
    > ID=XXXXXXXXXX;Password=XXXXXXX"
    > providerName="System.Data.SqlClient"/>
    >
    > This is setup the same as I have on my Godaddy account. The connection
    > string works fine on my web pages, but does not work for the
    > membership information.
    >
    > Then when I go to provide I only see: AspNetSqlProvider
    >
    > I click test and then I get: " Could not establish a connection to the
    > database. If you have not yet created the SQL Server database, exit
    > the Web Site Administration tool, use the aspnet_regsql command-line
    > utility to create and configure the database, and then return to this
    > tool to set the provider. " Which I have already run.


    I added the values just like in the example but used my own username
    etc, and it worked, but why and would it still work when I upload my
    web site to Godaddy?
    cs_in_va, Mar 7, 2008
    #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. Meena Desai

    Caching using aspnet_regsql

    Meena Desai, Feb 14, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    392
    Meena Desai
    Feb 14, 2005
  2. jj .NET

    aspnet_regsql Database Errors

    jj .NET, Jun 6, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    780
    jj .NET
    Jun 6, 2006
  3. =?Utf-8?B?T3dlbiBSaWNoYXJkc29u?=

    Login Controls and aspnet_regsql

    =?Utf-8?B?T3dlbiBSaWNoYXJkc29u?=, Sep 10, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    446
    =?Utf-8?B?T3dlbiBSaWNoYXJkc29u?=
    Sep 11, 2006
  4. Tony Johansson
    Replies:
    3
    Views:
    16,111
    Patrice
    Jan 2, 2010
  5. Ted
    Replies:
    0
    Views:
    122
Loading...

Share This Page