none
Error when trying to Encrypt credentials - Could not find certificate. RRS feed

  • Question

  • Hello,

    I'm trying to encrypt SQL credentials following the instructions: https://docs.microsoft.com/es-es/r-server/operationalize/configure-use-admin-utility#encrypt

    When selecting the option it found the certificate of the user logged in the computer (with administrator privileges):

    I can follow the procedure, encrypt the data and edit the appsettings.json file (adding Encrypt: true and pasting the encrypted connection to the SQL)

    However, after that I can't restart the Web Node.

    stderr.txt

    System.InvalidOperationException: Certificate with thumbprint 3F80EA4F6D35D2249349DFE1C063D0F06C00A07A not found in the certificate store
       at Microsoft.RServer.Common.Crypto.EnvelopeEncryptionExtensions.EnvelopeDecryptString(String encryptedString, ICertificateLoader certificateLoader) in C:\swarm\workspace\deployr-9.0.2\product\common\src\Microsoft.RServer.Common.Crypto\EnvelopeEncryptionExtensions.cs:line 43
       at Microsoft.RServer.WebNode.Extensions.ServicesExtensionsHelper.GetDbContextFuncAndType(IConfigurationRoot configurationRoot) in C:\swarm\workspace\deployr-9.0.2\product\server\src\Microsoft.RServer.WebNode\Extensions\ServicesExtensionsHelper.cs:line 19
       at Microsoft.RServer.WebNode.Extensions.ServicesExtensions.AddDomainServices(IServiceCollection serviceCollection, IHostingEnvironment env, IConfigurationRoot configurationRoot, String LogPath) in C:\swarm\workspace\deployr-9.0.2\product\server\src\Microsoft.RServer.WebNode\Extensions\ServicesExtensions.cs:line 59
    --- End of stack trace from previous location where exception was thrown ---
       at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
       at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)
       at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()
       at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
       at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()
       at Microsoft.RServer.App.Common.WebHostFactory.GetWebHost[TStartup](String uriSchema, Int32 port, HttpsConnectionFilterOptions httpsConnectionFilterOptions) in C:\swarm\workspace\deployr-9.0.2\product\server\src\Microsoft.RServer.App.Common\WebHostFactory.cs:line 22
       at Microsoft.RServer.WebNode.Program.Main(String[] args) in C:\swarm\workspace\deployr-9.0.2\product\server\src\Microsoft.RServer.WebNode\Program.cs:line 13

    Any suggestions? ¿If not a R Server problem but a configuration problem of Windows or any other tool, can you provide a link to a helpful resource?

    Thx!

    Monday, July 24, 2017 2:54 PM