Re: Connection to SQL Server CE Windows Service via C# - Error 250



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
com> wrote in message news:OQN1pvi$IHA.524@xxxxxxxxxxxxxxxxxxxxxxx
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
com> wrote in message news:OpwNqmi$IHA.3472@xxxxxxxxxxxxxxxxxxxxxxx
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.

"Blue Fish" <BlueFish@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8A130116-92A5-4103-9435-1756F0277426@xxxxxxxxxxxxxxxx
Will 3.5 work under Visual Studio 2005 with .NET 3.0? I am bound to
those
specific versions.

"Paul G. Tobey [eMVP]" wrote:

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" <BlueFish@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:8CCF2322-377A-4231-877E-F5361371D4A8@xxxxxxxxxxxxxxxx
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]" wrote:

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" <BlueFish@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D21D3EBD-9561-40A9-A21D-C2C62A5020A7@xxxxxxxxxxxxxxxx
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]" wrote:

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.

"Blue Fish" <Blue Fish@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message
news:A3453930-4081-46F8-B488-337DDC5CC97E@xxxxxxxxxxxxxxxx
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?















.



Relevant Pages

  • Re: An Encryption Strategy - Comments Please
    ... If that is a concern then use a secure connection to SQL. ... >>> I posted in this forum not long ago regarding encryption. ... >>> list in this same database. ... >>> DPAPI encryption is account dependent. ...
    (microsoft.public.dotnet.security)
  • Re: Secure data in SQL Server 2005 Mobile Edition
    ... It turns out that the algorithm used depends on the version of SQL Compact and also what platform it's running on as not all platforms capable of running SQLce support the same encryption. ... how can the database be encrypted with just ...
    (microsoft.public.sqlserver.ce)
  • Re: RDA and encryption
    ... You can password protect your SQL CE database and/or encrypt the contents ... > on the PocketPC supports any type of encryption? ...
    (microsoft.public.sqlserver.ce)
  • Re: Ecrypting a database
    ... Windows comes with a native file/folder encryption, ... account would need access to the database to unencrypt the ... >> I have a SQL database which will only be accessed only ...
    (microsoft.public.sqlserver.security)
  • VS 2005 Setup Project
    ... WebSite Interface ... Windows Service. ... SQL 2005 Database. ...
    (microsoft.public.vsnet.setup)