Whenever you create an application using EF code first you can see follwing web.config key added:
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
You can easily see that it contains no application specific information. Changing those values do not affect how application runs, so it makes me think it must be some kind of unnecessary EF artifact, possibly required by the designer. However if you remove this key completely application will throw ConfigurationError on start. What is the real purpose of this key?
The connection string you refer to:
has nothing to do with Entity Framework. It’s part of the template for all non-empty ASP.NET projects, both WebForms/WebPages and the MVC framework. It’s used to connect to an embedded database that would reside in your
App_Datafolder and lets you use the ASP.NET provider model without needing an instance of SQL Server. If you weren’t sure, take a look at the defaultconnectionStringvalue for theMembershipsection: