Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / DB Engine / SQL Server CE / August 2008

Tip: Looking for answers? Try searching our database.

Connection to SQL Server CE Windows Service via C# - Error 25080

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Blue Fish - 14 Aug 2008 12:51 GMT
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] - 14 Aug 2008 16:16 GMT
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.

> SQL Server CE 2005, Visual Studio 2005, C#
>
[quoted text clipped - 7 lines]
> I assume that the issue is permissions, but does anyone know of how to
> resolve this issue?
Blue Fish - 14 Aug 2008 16:27 GMT
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.

> 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
[quoted text clipped - 13 lines]
> > I assume that the issue is permissions, but does anyone know of how to
> > resolve this issue?
Paul G. Tobey [eMVP] - 14 Aug 2008 16:31 GMT
Is encryption specified in the connection string?  How are you requesting
access, user name and password explicit in the connection string?

Paul T.

> Operating System: Windows XP Professional (5.1, Build 2600) Service Pack 2
>
[quoted text clipped - 29 lines]
>> > I assume that the issue is permissions, but does anyone know of how to
>> > resolve this issue?
Blue Fish - 14 Aug 2008 16:41 GMT
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.

> Is encryption specified in the connection string?  How are you requesting
> access, user name and password explicit in the connection string?
[quoted text clipped - 34 lines]
> >> > I assume that the issue is permissions, but does anyone know of how to
> >> > resolve this issue?
Paul G. Tobey [eMVP] - 14 Aug 2008 16:50 GMT
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.

> Encryption is not specified in the connection string.  This is SQL Server
> Compact 3.1 (2005).
[quoted text clipped - 54 lines]
>> >> > to
>> >> > resolve this issue?
Blue Fish - 14 Aug 2008 16:59 GMT
Will 3.5 work under Visual Studio 2005 with .NET 3.0?  I am bound to those
specific versions.

> 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
[quoted text clipped - 61 lines]
> >> >> > to
> >> >> > resolve this issue?
Paul G. Tobey [eMVP] - 14 Aug 2008 17:20 GMT
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.

> Will 3.5 work under Visual Studio 2005 with .NET 3.0?  I am bound to those
> specific versions.
[quoted text clipped - 74 lines]
>> >> >> > to
>> >> >> > resolve this issue?
Paul G. Tobey [eMVP] - 14 Aug 2008 17:36 GMT
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.

> 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
[quoted text clipped - 81 lines]
>>> >> >> > to
>>> >> >> > resolve this issue?
Laxmi Narsimha Rao Oruganti [MSFT] - 18 Aug 2008 10:56 GMT
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

> 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
[quoted text clipped - 91 lines]
>>>> >> >> > to
>>>> >> >> > resolve this issue?
ErikEJ - 14 Aug 2008 16:57 GMT
Try to configure the service to run under a user account.

Signature

Erik Ejlskov Jensen, Mobile App Dev MCTS
Check out my SQL Compact blog at
http://erikej.blogspot.com

> Encryption is not specified in the connection string.  This is SQL Server
> Compact 3.1 (2005).
[quoted text clipped - 54 lines]
>> >> > to
>> >> > resolve this issue?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.