BC 22.0 Import-NAVEncryptionKey The provided encryption key file contains invalid data

edwinschutten
Member Posts: 18
Hello,
I'm trying to install Business Central 22.0 on an Azure VM.
I have created an Azure SQL database with a dba owner user.
The database encryption has been enabled (CREATE MASTER KEY ENCRYPTION BY PASSWORD = '').
Now I want to configure the database user and password for the BC service tier.
New-NAVEncryptionKey -KeyPath "C:\Temp\BC.key" -Password (Get-Credential).Password
I'm not sure wat password I should use. I have to fill-in an username and password.
So I use the credentials from the database user.
Than I want to import the key.
Import-NAVEncryptionKey -ServerInstance <BC Service tier name> -KeyPath "C:\Temp\BC.key" -ApplicationDatabaseServer <Azure Instance> -ApplicationDatabaseName "<Azure database name>" -ApplicationDatabaseCredentials (Get-Credential)
I use the credentials from the database user.
Now I get an error:
Import-NAVEncryptionKey : The import failed. The provided encryption key file contains invalid data and could not be imported.
At line:1 char:1
+ Import-NAVEncryptionKey -ServerInstance <BC Service tier name> -KeyPath "C:\Te ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (0:Int32) [Import-NAVEncryptionKey], NavEncryptionInvalidKeyFileException
+ FullyQualifiedErrorId : MicrosoftDynamicsNavServer$<BC Service tier name>,Microsoft.Dynamics.Nav.Management.Cmdlets.Impor
tNavEncryptionKey
I have no clue why the encryption key file has invalid data. Are there some invalid characters in the password, like %, $ or ....?
I'm trying to install Business Central 22.0 on an Azure VM.
I have created an Azure SQL database with a dba owner user.
The database encryption has been enabled (CREATE MASTER KEY ENCRYPTION BY PASSWORD = '').
Now I want to configure the database user and password for the BC service tier.
New-NAVEncryptionKey -KeyPath "C:\Temp\BC.key" -Password (Get-Credential).Password
I'm not sure wat password I should use. I have to fill-in an username and password.
So I use the credentials from the database user.
Than I want to import the key.
Import-NAVEncryptionKey -ServerInstance <BC Service tier name> -KeyPath "C:\Temp\BC.key" -ApplicationDatabaseServer <Azure Instance> -ApplicationDatabaseName "<Azure database name>" -ApplicationDatabaseCredentials (Get-Credential)
I use the credentials from the database user.
Now I get an error:
Import-NAVEncryptionKey : The import failed. The provided encryption key file contains invalid data and could not be imported.
At line:1 char:1
+ Import-NAVEncryptionKey -ServerInstance <BC Service tier name> -KeyPath "C:\Te ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (0:Int32) [Import-NAVEncryptionKey], NavEncryptionInvalidKeyFileException
+ FullyQualifiedErrorId : MicrosoftDynamicsNavServer$<BC Service tier name>,Microsoft.Dynamics.Nav.Management.Cmdlets.Impor
tNavEncryptionKey
I have no clue why the encryption key file has invalid data. Are there some invalid characters in the password, like %, $ or ....?
0
Answers
-
I found the problem, there was a typo in the password of the key file. It would be nice if the error was "invalid password".0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions