title: Always Encrypted Feature - Failed to decrypt column. Call from Windows-Service App
body: <p><strong>.NET Framework Ver = 4.6.2
  , Database = SQL Server 2016</strong></p>
  
  <p><strong>App Type = Windows Service</strong></p>
  
  <p>We are working on the "Always Encrypted" feature in the SQL 2016 db to perform the encryption on certain customer data columns. Our web application is built in the ASP.NET MVC architecture and is working fine with this new feature. We have copied and imported the certificate from the database server over to the IIS web-server. And the web-application is working smoothly.</p>
  
  <p>But when we try to access the DB from a windows service application running on a separate server, it throws the following exception.</p>
  
  <p><strong>Failed to decrypt column 'ColumnX'.
  Failed to decrypt a column encryption key using key store provider: 'MSSQL_CERTIFICATE_STORE'. The last 10 bytes of the encrypted column encryption key are: '76-34-51-DA-41-8F-52-D1-A1-EE'. 
  Keyset does not exist</strong></p>
  
  <p>We have copied and imported the same certificate with the similar steps over to the server running the windows-service application.</p>
  
  <p>Please suggest, if i am missing something in the certificate installation. Do we need to edit some propertied in the installed certificate ?</p>