How to access Database which was in APP_DATA
I developed a sample for membership and roles using the video tutorial available. Now what i need is if i run my example in the other machine i would like to login and access the pages with the user name and password that were created using Asp.Net Configuration in my machine can any one give me an idea to achieve this


Jiteendra SampathiraoRank #585 · 4.1K reputationPosted Jul 7, 2011, 4:16 AM EDT
To access db which was in App_Data folder:
<connectionStrings>
| <add name="LocalSqlServer" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|Directory|myDB.mdf;Integrated Security=True;User Instance=True"/>
connectionStrings>
For asp.Net membership an roles:
Please refer this links:
Link1
Link2
i hope it help you..Dorababu MekaRank #457 · 5.5K reputationPosted Jul 7, 2011, 4:21 AM EDT
AttachDbFilename=|Directory|myDB.mdf;
What should be the directory name here
Jiteendra SampathiraoRank #585 · 4.1K reputationPosted Jul 7, 2011, 4:37 AM EDT
right click on the mdf file. And then click on property -->Then you can see connection string value
you mdf file storing address means directory....
Place your file storing location at |Directory| place
Dorababu MekaRank #457 · 5.5K reputationPosted Jul 11, 2011, 2:15 AM EDT
" providerName="System.Data.SqlClient"/>
So it will read the mdf from the specified path