I've built an application with a local.mdf database, and I've deployed the app. I tested it on my PC; there were no problems. The application works perfectly. Today, I installed the app on a client's PC, and I got this error:
Although all the files are in place and SQL Server 2016 installed on my client's PC.
I can think of two reasons:
c:\MyProgram\database.mdf
So if you move the database somewhere else other than that folder, simply it won't work because it won't be able to find Database file.
Solution: use a dynamic location, so no matter where the app is installed, it should find your DB.
Solution: reinstall or repair SQL Server .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.