I am working on a SQL Compact demo app, and one of the things I my setup project does is copy an SDF file to the user's c:\ProgramData
folder. However, when the app is run on the user's machine, I get the following error:
System.Data.EntityException: The underlying provider failed on Open. ---> System.Data.SqlServerCeException: Access to the database file is not allowed. [File name = c:\ProgramData\Foresight Systems\SQL Compact Demo\LocalData.sdf]
I am puzzled as to what's causing this error. Isn't c:\ProgramData
the preferred location for this sort of file? What do I need to do in my setup project to get this to work? Thanks for your help.