ASPNETDB database files are continually created when Web Site invoked

The ASPNETDB files are created in the App_Data folder but according to the textbook, these files should no longer be created.
I am using Visual Studio 2010, and I am working from Chapter 13 ‘Security and User Authentication’ from Sitepoint’s “Build Your Own ASP.Net 4 Website using C# and VB”

Whenever I invoked VS2010, the ASPNETDB files in the App_Data folder are created, therefore, it appears it has nothing to do with the Website/ASP.Net Configuration invocation. I was checking for any errata that states any missing steps which may be causing this issue, but I have not been able to find any relevant information regarding this issue. Might someone steer me in the right direction to find any missing
information, or possibly inform me of what I am doing wrong?

Below is the Web.config file as outlined in the textbook

<connectionStrings>
<add name="ApplicationServices" connectionString="data
source=.\SQLEXPRESS;Integrated
Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"   
providerName="System.Data.SqlClient" />
<add name="dorknozzle" connectionString="Server=localhost\SQLExpress;
Database=dorknozzle;Integrated Security=True"  
providerName="System.Data.SQLClient" /> 
<remove name="LocalSqlServer"/>  
<add name="LocalSqlServer" connectionString="Server=localhost\SqlExpress;Database=Dorknozzle;Integrated
Security=true" providerName="System.Data.SqlClient"/>
</connectionStrings>

SitePoint Forum Members,

This problem is resolved. The cause of the issue was the omission of the following line in the Web.config file. It should succeed the last line in the code above, preceding the ending connectionString tag.

<add name="dorknozzleConnectionString" connectionString="Data Source=localhost\SQLExpress;Initial Catalog=dorknozzle;Integrated Security=True"
      providerName="System.Data.SqlClient" />
2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.