I am trying to deploy an Always Encrypted app to Amazon AWS. There is a 2016 RDS database and a Windows Server 2016 hosting the ASP.NET 4.6 app.
On the Windows Server, when the application is run under Network Service or the Application Pool Identity, we get what I'm pretty sure is this exact problem.
Our Error:
System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out
- We tried the solution in that post and it didn't work
- We tried the solution in this post and couldn't get the powershell script to return enything except runtime exceptions. I am not very familiar with powershell so maybe I don't understand the script.
- If we import the certificate to the Andministrator account, and run the IIS app pool with the Administrator account then everything works fine (not a connectivity issue or anything)
- We tried importing the certificate to the local computer "Personal" certificates and giving the application account full control of the keys
- We tried importing the certificate to the local computer Trusted Root Certification Authorities (as suggested in a s/o post somewhere).
- We tried running certmgr with "runas" for both the DefaultAppPool and Network Service account, but when prompted for the password did not know what that would be (blank password did not work). I even looked up the DefaultAppPool password as suggested here and according to that output the password is blank.
So far nothing (apart from running the app as Administrator) as worked and we're at a loss what to try next. We've looked high and low for some sort of "Microsoft Official Deployment Guide" but all that is out there is tutorials on how to get Always Encrypted working in a local dev environment, nothing about server deployment.