How can I change the name of the ASP.NET toolkit connection string? (Which connection string will the ASP.NET configuration tool use) I learn ASP.NET everywhere, and in the book I'm reading right now, the connection string is: LocalSqlServer.
I want to use my local sql server database instead of sql express to store roles, memberships and other data.
I used aspnet_regsql.exe to create the required data structures in my database. after that I changed my web.config as follows:
<connectionStrings> <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString="Server=(LOCAL); Database=MyDatabase;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings>
but when I run the ASP.NET configuration tool, it says that: "The connection name" ApplicationServices "was not found in the application configuration or the connection string is empty."
The ASP.NET configuration tool uses a connection string named: ApplicationServices, not LocalSqlServer.
the reason is that I need to change web.config: <connectionStrings> <add name="ApplicationServices" connectionString="Server=(LOCAL); Database=MyDatabase;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings>
and everything is working fine.
I want to know why the hell my site uses a connection string with the name: ApplicationServices and all books and online documentation uses LocalSqlServer? and how to change it to LocalSqlServer?
I have: Windows 7 Sql Server 2008 R2 Visual Studio 2010 Premium Project Type - Website
source share