Discussion:
Connection to SQL Server CE Windows Service via C# - Error 25080
(too old to reply)
Blue Fish
17 years ago
Permalink
SQL Server CE 2005, Visual Studio 2005, C#

I have a windows service that I wrote that runs under the Local Service
account. I cannot connect to my SQL Server CE database. Every call to

_dbConnection.Open();

yields Error 25080 - The operating system does not support encryption. Now
I assume that the issue is permissions, but does anyone know of how to
resolve this issue?
Paul G. Tobey [eMVP]
17 years ago
Permalink
Funny, I'd assume that the problem is that the operating system doesn't
support encryption. What is the connection string? What version of Windows
CE is running and what's built into it?

Paul T.
Post by Blue Fish
SQL Server CE 2005, Visual Studio 2005, C#
I have a windows service that I wrote that runs under the Local Service
account. I cannot connect to my SQL Server CE database. Every call to
_dbConnection.Open();
yields Error 25080 - The operating system does not support encryption.
Now
I assume that the issue is permissions, but does anyone know of how to
resolve this issue?
Blue Fish
17 years ago
Permalink
Operating System: Windows XP Professional (5.1, Build 2600) Service Pack 2

I'm using SQL Server Compact Edition as a private data store.

The reason I mentioned a permissions issue is that I can connect to the same
DB via C# in a Windows application that is not running as a service under the
Local Service account.

So my theory was that the Local Service account is somehow restircted in a
way that prevents it from accessing the appropriate encryption mechanism to
connect to the DB.
...
Paul G. Tobey [eMVP]
17 years ago
Permalink
Is encryption specified in the connection string? How are you requesting
access, user name and password explicit in the connection string?

Paul T.
...
Blue Fish
17 years ago
Permalink
Encryption is not specified in the connection string. This is SQL Server
Compact 3.1 (2005).

I am explicitly provinding the Data Source and Password attributes in the
connection string.

I have since created a new database, with an empty password. I am able to
connect to it via the windows service under the Local Service account.

However, I would like to have the database password protected.
...
Paul G. Tobey [eMVP]
17 years ago
Permalink
Hmmm. That really feels strange. I suppose that you could try the same
experiment, of a new database with a password to see if it's something
specific to your database or if it's really the password itself. You could
try SQLCE 3.5, too, if it does seem to be just the password.

Paul T.
...
Blue Fish
17 years ago
Permalink
Will 3.5 work under Visual Studio 2005 with .NET 3.0? I am bound to those
specific versions.
...
Paul G. Tobey [eMVP]
17 years ago
Permalink
I've never done it (I went straight from .NET 2.0 to 3.5), but I don't see
why not. Let me fool around with it a bit. It should just be a matter of
what references you have in your project, I'd think.

Paul T.
...
Paul G. Tobey [eMVP]
17 years ago
Permalink
As far as I can tell, the SQLCE 3.5 assemblies reference .NET 2.0 and work
fine from VS2005. It's not a cure-all, since I don't know that the problem
would be fixed there, either, but, if nothing else works...

Paul T.

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
...
Laxmi Narsimha Rao Oruganti [MSFT]
17 years ago
Permalink
This is probably 3rd time I am hereing to a case the encryption related
issues come when there is a Windows Service in picture. Unfortunately I
could not get more details on the earlier two occurrences. I hope to reach
the root cause at least this time on this thread.

In SQL CE v3.1 case, can you try using Crypto API under the same credentials
and process as SQL CE where things are failing and see if you are able to
use the API correctly. In SQL CE, we just call Crypto API and if these API
fail, we fail and there is no intermediate here. So, I want to bypass SQL
CE and directly hit the WIN32 API and see if things work. In any case, I
would definitely own talking to teams inside MS to reach to a conclusion.

Thanks,
Laxmi

"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
...
ErikEJ
17 years ago
Permalink
Try to configure the service to run under a user account.
--
Erik Ejlskov Jensen, Mobile App Dev MCTS
Check out my SQL Compact blog at
http://erikej.blogspot.com
...
Loading...