Hello Will,
There is a big difference when you run your scripts on your local machine and when you run it on a remote server. I am not sure why Visual Web Developer(VWD) did not add this code in web.config on your local machine but its necessary to add it on server in case of AspNetSqlRoleProvider.
Visual Web Developer is a tool for creating ASP.NET Web Sites / applications, by default it uses the name ASPNETDB.mdf for the database file.
You have to consider two factors -
connecting web site on local machine using VWD
or
connecting web site on remote server
When you access web site on local machine using VWD, it creates the database file ASPNETDB.mdf on local machine to attach it in connection string. As AttachDB method is not recommended on server we have suggested to create a physical database and use it in connection string.
To make changes(including database name, its login detail etc.) in your web site you have to connect to server using VWD and make the required changes. I am sorry but I am not sure why VWD did not allow you to change the database name on your local machine.
|