I have a .NET 4 application (in mixed mode) with System.Data.Sqlite (1.0.82) for database access to an encrypted database.
When I install the application to "c:\program files\myfolder" the connect to the sqlite database file is slow. Log files show that it's the sqlite connect statement that is delayed by a few seconds.
The problem does not occur when I do the following:
- Run the application with admin privileges
- Install any other place than c:\program files\
- Install the application to c:\program files\, but move the database to another folder.
I have no clue what can be the cause of this...
If the DB file is in the application directory then it's most likely that the UAC is moving it to the "...appdata\Local\VirtualStore\Program Files" directory. Best practice is to create your own appdata\MyApp folder and copy the pristine DB out of the c:\program files\MyApp folder.