I have developed a simple WPF application in visual studio 2010.
Then i created it's setup. Steps to build setup are as follow:
1)Created a new project for deployment(Named Setup1).
2)Then i copied all files from the Bin folder of my WPF application and Pasted all files in Application Folder of deployment project.
3)Build Setup1.
4)Then i install the Setup1.msi (That was in Bin folder of Setup1 deployment project).
*****************************************************
After installation of Setup1.
1)I can retreive the database from database.
2)But it generate exception
Exception:Failde to update the database "database name" because database is read only. When i try to insert data into the database.
******************************************************
My connection string is:
string connectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename="+Directory.GetCurrentDirectory().ToString()+
@"\tryDatabase.mdf;Integrated Security=True;User Instance=True";
How can i solve this problem?