In my application if the application installed for the first time on client machine, the application will restore there database if the database dose not exsist .. I included the .bak database according This artical :
- Create a folder under the app in VS name e.g. "datafiles"
- Add all files to that folder using Add as link in the dialog box after selecting Add existing item on the folder
- Mark all files as Copy if newer (Copy to output directory property)
- Make sure the build action is content
when I publish the files put in publish folder and be a part of the application installation
Until now every thing work fine..
The probelm is when I trieng to restore the database from my code, the VS say :
"Cannot open backup device, Operating system error 5 (Access is denied.)."
I tried to run the VS as administrator but this does not make any change..
Please can any one help me to solve this issue
Thanks in advance
Abdusalam