views:

315

answers:

3

Have a smartclient application that is distributed using Click-Once, but also includes a SQLite DB for a local cache.

The problems is that once the app is published it doesn't seem to be able to open the SQLite DB file. Have included the DB file as part of the install process...

Any thoughts?

A: 

Have you included the SQLite provider in the package?

Parsa
Yes, its just not able to open the db file. Works fine when debugging, which makes me thing it might be a security thing?
Jan de Jager
+2  A: 

When a ClickOnce application is set to "Full Trust", on install it will prompt the user to grant full trust. This means that the application will have all the same privileges on the computer as the user running the application (editing the regisitry, file io, etc). You mentioned in the comments that the app is set to full trust, so it would appear that it's not a security issue.

Are you certain all of the necessary files are getting deployed? I would just remove ClickOnce from the picture. Look at all the files in your deployment, create a folder and copy all those files into it, then try to run it. Does it work? My initial guess is that some needed file is not being included in the ClickOnce deployment.

whatknott
+1  A: 

Check the path that your app is using to get to the database. Virtuallized paths can cause these sorts of problems on Vista and above.

Then check the read/write permissions on the database file.

Martin