2

I have a windows application built with .NET 4.0. It has a SqlCe database under its program files directory: C:\Program Files\Company Name\Application Name\Data\Data.sdf

This application is installed with Inno Setup and the Data folder is given permission with this inno setup configuration:

[Dirs]
Name: {app}\Data; Permissions: users-modify

However, even if I deploy this application without the installer (just zip up all the files from my development machine and unzip on the target machine's desktop) I still face these same issues. So I do not think it is a file directory permission issue.

For certain kinds of windows users, it will take 13+ seconds to open a connection to this database on Windows XP machines.

On our client's XP computers:

  • Domain admins can run fine.
  • Local admins and local limited users will experience the slow connection open.

On my personal XP Home computer:

  • Admins can run this fine.
  • Limited users will experience the slow connection open.

On my personal Windows 7 machine, it runs fine with local admin and local limited account.

Other notes that might help:

I am using SqlCe 4.0. I am bin deploying the SqlCe files so that the target machine does not have to install SqlCe.

This application will sometimes delete and re-download the Data.sdf file as part of it other processes (sync).

This application is also using WPF and Entity Framework.

Please help. Nearly every screen in this application will open and close the database connection.

Thanks

Joel
  • 1,033
  • 2
  • 12
  • 23
  • Do you experience the same issue if installing say in the 'user app' directory (aka `AppData\Local`) ? – leppie Jul 28 '12 at 01:22
  • The installer that I built does not allow me to configure the install directory. I will have to go back and build another installer that does allow me to configure that. I have tested "installing" the app by simply zipping up the files from my dev machine and using the limited account to unzip the files onto the limited account's desktop. That should provide the limited user with any kind of file permission he needs. Besides, the user is able to read and write to that directory. It just takes a long time to open the database connection. – Joel Jul 28 '12 at 01:39
  • I have posted a mirror post on Microsoft forums: http://social.technet.microsoft.com/Forums/en-US/sqlce/thread/1b21bb10-1fa3-4954-87d2-f3fa61e8256a – Joel Jul 28 '12 at 01:45
  • Could be issue with access to the Crypto files on XP - See this post in the MSDN forum http://social.msdn.microsoft.com/Forums/en-US/sqlce/thread/eb6a01a7-0bfd-41e3-b4c8-34581c5ccaa3 for a workaround – ErikEJ Jul 28 '12 at 08:24
  • 1
    Erik, that thread did solve my problems. But why did you replace your answer with a comment? – Joel Aug 08 '12 at 15:33

0 Answers0