We help IT Professionals succeed at work.

SQL always encrypted not working on web server

taz8020
taz8020 used Ask the Experts™
on
Hi I have just started using always encrypted. I am using it on a webserver.
When i connect using sql managment studio it works fine however on the website thows and error about the permisions.

1st question, is it it safe to use on a webserver as the certificates and data are on the same device.
2nd question, how do i get it to work on IIS website?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016

Commented:
What is the error message and in your webservers connection string in the web.config does the user have the required permissions?
Fractional CTO
Distinguished Expert 2018
Commented:
1) Hi I have just started using always encrypted. I am using it on a webserver. When i connect using sql management studio it works fine however on the website throws and error about the permissions.

As David Johnson requested, provide the URL of your Website so the actual error can be seen...

And... likely you're going to have to get into your Webserver to review dir/file permissions + review your logs for how to fix the problem.

Just guessing. I'd say the user/pass you're using to access your database is correct in Studio + incorrect in your Webserver database config file.

2) 1st question, is it it safe to use on a webserver as the certificates and data are on the same device.

Likely certs have nothing to do with your mentioned problem.

Best to resolve this problem first, then if there's some other cert related problem, work that problem in another question.

3) 2nd question, how do i get it to work on IIS website?

To answer this, you must define specifically what "it" might mean.

Certs working? Website error fixed? Cert security issues? Cert sharing issues?

Be very specific. Also if this is a second question (unrelated to Website error), then best open a 2nd question.

Author

Commented:
Certificate with thumbprint '1234567890' not found in certificate store 'My' in certificate location 'CurrentUser'. Verify the certificate path in the column master key definition in the database is correct, and the certificate has been imported correctly into the certificate location/store.
Parameter name: masterKeyPath.

Does it store the certificate on the sql server or the one you are using stdiomanagment?