How do i add an App_Data in my window application. Actaully i am facing an issue like
An attempt to attach an auto-named database for file c:\inetpub\wwwroot\Demo\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
For this error i got an article saying that keep .mdf file in App_Data folder if we give path as AttachDbFilename = | DataDirectory | / Database.mdf;
(as of now i am giving same path) in connection string. so i need an App_Data folder in window application if not how to solve this error.
my connection string as fallows:
<add name="BCT"
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\SQL2005_652242_bct_data.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
providerName="System.Data.SqlClient" />