Some Encryption/Decryption Questions

I am using Microsoft Pro Sync Franework to synchronize a SQL Server CE 3.5 database with SQL Server 2008 R2 Express. I have a few question:

I know how to encrypt the connection string in app.config. How do I decrypt it on the server side so it is not transmitted in plain text?

The database is relatively small. How would I programmatically encrypt the entire db on both computers and then maintain synchronization? It would not work well if the encryption depended on the user/machine combination. I would need to use a machine independent method.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You should force SSL connections on the SQL server and use that instead.
Here is how to configure the SQL server

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rkulpAuthor Commented:
Thanks for your quick post.
Unfortunately I have a SSL certificate from a trusted CA that won't work because the SQL Server Express server is behind a router using port forwarding. Hence, I can't use aliasing. I'll look into a self-signed certificate and force the trust.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

rkulpAuthor Commented:
The link you provided did help me. I was able to find the thumbprint (although Firefox calls it a fingerprint) and put that in the registry. The service has started up again. It may take a bit of testing to get definitive results that the SSL is working properly, but it should work when the connection string is changed from http:// to https://.
rkulpAuthor Commented:
I appreicate your help.
Glad to have helped you get it working.
rkulpAuthor Commented:
Here is what I had to do for the connection string:
        Dim builder As New System.Data.SqlClient.SqlConnectionStringBuilder
        With builder
            .DataSource = Trim(txtServer.Text)
            .UserID = Trim(txtLoginName.Text)
            .Password = Trim(txtPassword.Text)
            .IntegratedSecurity = False
            .PersistSecurityInfo = True
            .InitialCatalog = "HouseholdInventory"
            .Encrypt = True
            .TrustServerCertificate = True
        End With

Open in new window

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.