1

I have WPF application that is using EF6 with local SQL Server Compact Edition 4.0 database.

I’m using private deployment for SQL Server Compact Edition.

Application works without any errors on 99% of the workstations but I’m encountering a problem on the single one.

When I launch the application I receive MessageBox with below error:

“Underling provider failed on open”.

The error is thrown by the system (as I don’t have any MessageBox in my code) when I try to initialize Entity Framework data context.

I have found that when I run application “as an administrator” the problem doesn’t occur. Another thing I have noticed that when I run as an administrator on that laptop it takes a almost minute to load.

The only difference between environments that I can find is that on the not working laptop there is SQL Server Express 2012 installed.

Do you think it can have any influence on my application? Could be some DLLs conflict?

*edit I have installed SQL Server Express 2012 on the different machine and my application is working without problems. So I'm not sure if that's the reason.

Regards,

macfly
  • 255
  • 3
  • 13
  • the compact SQL 2008 you mean right ? – Franck Nov 04 '14 at 12:16
  • I made a mistake. It's SQL server 2012 express that is installed on client's workstation – macfly Nov 04 '14 at 13:04
  • 1
    The important bit is that it works when ran as admin, fails when not. That's a permissions problem. For something like this, I'd start off by making sure that %Temp% is usable by anyone, not just admins or special user groups. – StarPilot Nov 04 '14 at 21:03
  • You are right. The problem was that the sdf file is stored in ProgramData folder. Just don't understand why it was the issue only on one workstation. I have tested on the different one with the user account without admin rights and it was working. – macfly Nov 05 '14 at 10:30

0 Answers0