Configuration Error for ASPNETDB

Discussion in 'Databases' started by raziiq, Mar 13, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi there.
    This is my First time uploading a Data Driven Website. I have got 2 databases in my website, one is membership and roles database "ASPNETDB" and the other is my own Database "MainDB". I already have bought MS SQL 2008 add on from DiscountASP.net. This is what i did already

    * I uploaded the Database ASPNETDB.mdf file to my website.
    * using SQL Tool in control Panel, i attached the database.
    * Then i uploaded my other database "MainDB.mdf" using above method.
    * Then in Visual Web Developer, i copied my site to Host (DiscountASP.net) using FTP, after changing the connectionString in webconfig file, but i am getting this error when i run my app using the URL of my site.

    this is the error i am getting.

    Code:
    Configuration Error
    
    Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 
    
    Parser Error Message: The connection name 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.
    
    Source Error: 
    
    
    Line 158:        <roleManager>
    Line 159:            <providers>
    Line 160:                <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    Line 161:                <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    Line 162:            </providers>
    
    Source File: C:\Windows\Microsoft.NET\Framework\v2.0.50727\Config\machine.config    Line: 160 
     
  2. Alright i got this working, i overridden the membership from my machine.config to web.config.

    Now the problem is, only 1 of my DB(ASPNETDB) is working, my other DB (MainDB) is not working. If i attach one DB using SQL Tool in control panel, the other gets overwritten :(, how to make both DB's work??
     
  3. I have done what you said, thanks for the link. Using the instructions i have successfully exported all the data from ASPNETDB to MainDB.db on my Local PC, but stored procedures are not exported, i even cant see any option in SQL Server management Studio to export the stored procedure of ASPNETDB to some other DB.

    How to export all the data of ASPNETDB including stored procedures, to some other database, in my case to MainDB.mdb??

    BTW i am using SQL Server Express 2005 and SQL Server Management Studio 2008.
     
  4. alright i have successfully exported the tables and stored procedures to my MainDb from ASPNETDB using aspnet_regsql.exe but now the problem is that, the data (users, roles etc) are not exported into it, what should i do to export the data also??
     
  5. Hi,
    To get other objects the common method is to create a script.
    ScottGu has a good article here:
    http://weblogs.asp.net/scottgu/arch...-and-execute-it-to-deploy-a-sql-database.aspx

    You can also use SQL Server to create the scripts then use the DASP on-line DB manager to run the script against the correct DB server.
    https://sqlwebadmin.discountasp.net/

    This is a tough one because you should use the Attach feature to bring the entire thing in but if you do it will wipe out your SQL DB.
    If that's not a problem start over but this time use the Attach feature.
    All the best,
    Mark
     
  6. thanks for the reply.

    As i have already exported all the tables and stored procedures in my MainDB, so if i run the script on ASPNETDB to get the data from it, wont it mess with my MainDB, as script will have the database name with it and in my case DB has been changed??
     
  7. Hi,
    Yes you have to be very careful.
    Whatever you do please make a backup each time.

    In each migration of SQL Express to the Web edition of SQL Server the best option is to bring your Express DB into a fresh SQL Server DB.
    There are ways however to "massage" your records/objects.

    None of that is "easy", DBA's are paid a lot of money for this sort of thing. ;-)

    Where ever you are with your data we can give some tips however, the most important being...Backup.
    You can use the DASP Control Panel Backup feature then move the backup file to another folder on your server...This will allow you to have multiple backups.
    All the best,
    Mark
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page