Showing posts with label ide. Show all posts
Showing posts with label ide. Show all posts

Monday, March 26, 2012

Proper way to rename ASPNETDB.MDF? Custom provider the solution?

ASP.NET 2.0...

What is the proper way to rename the ASPNETDB.MDF to another name, such as TEST_ASPNETDB.MDF?

I know you can rename the db in the IDE, BUT, there are other places you need to change so that ASPNETDB.MDF isn't recreated. Do I have to make a custom SQLExpress provider or something to that effect?

Any examples? Thanks...

Change the connection strings in web.config:

<?xmlversion="1.0"?>

<configuration>

<connectionStrings>

<clear/>

<addname="LocalSqlServer"connectionString="Data Source={Machine name};Initial Catalog=TEST_ASPNETDB;{Rest of connect string here}"providerName="System.Data.SqlClient"/>

</connectionStrings>