Overview
You might get the following errors when trying to export content from and M-Files on-premise vault to M-Files Cloud vault through replication:
M-Files
Test replication {8EA7E9B1-34D2-4F60-98B9-53A6BA882330}
Input string was not in a correct format.
XMLArchiveManager.cpp, 1783, Input string was not in a correct format. (0x80131537)
(M-Files 22.9.11727.0 2022-09-16T17:51:10.176Z)
and at the same time the following in the Windows Event Log (a similar message is also shown in the Scheduled Job status in M-Files Admin in the Last Run column):
Test replication {8EA7E9B1-34D2-4F60-98B9-53A6BA882330}
The job "Content export" finished running.
Status: Failed. Error: Export of a content package failed.
Vault ID: {8EA7E9B1-34D2-4F60-98B9-53A6BA882330}
Target: C:\M-Files Content Packages\Test replication\Out\
Export of a content package failed.
\\?\C:\M-Files Content Packages\Test replication\Out\{8EA7E9B1-34D2-4F60-98B9-53A6BA882330}_20220916_205103\
RPCScheduledJobsHelper.cpp, 3217, Export of a content package failed.
Vault ID: {8EA7E9B1-34D2-4F60-98B9-53A6BA882330}
Target: C:\M-Files Content Packages\Test replication\Out\
(0x8004090F)
RPCScheduledJobsHelper.cpp, 2460, Export of a content package failed.
Vault ID: {8EA7E9B1-34D2-4F60-98B9-53A6BA882330}
Target: C:\M-Files Content Packages\Test replication\Out\
(0x8004090F)
VaultManager.cpp, 620, Export of a content package failed.
Vault ID: {8EA7E9B1-34D2-4F60-98B9-53A6BA882330}
Target: C:\M-Files Content Packages\Test replication\Out\
(0x8004090F)
VaultManager.cpp, 620, Export of a content package failed.
\\?\C:\M-Files Content Packages\Test replication\Out\{8EA7E9B1-34D2-4F60-98B9-53A6BA882330}_20220916_205103\ (0x8004090F)
RPCVaultAdminHelper.cpp, 1213, Export of a content package failed.
\\?\C:\M-Files Content Packages\Test replication\Out\{8EA7E9B1-34D2-4F60-98B9-53A6BA882330}_20220916_205103\ (0x8004090F)
XMLArchiveManager.cpp, 2064, Export of a content package failed.
\\?\C:\M-Files Content Packages\Test replication\Out\{8EA7E9B1-34D2-4F60-98B9-53A6BA882330}_20220916_205103\ (0x8004090F)
XMLArchiveManager.cpp, 20883, Export of a content package failed.
\\?\C:\M-Files Content Packages\Test replication\Out\{8EA7E9B1-34D2-4F60-98B9-53A6BA882330}_20220916_205103\ (0x8004090F)
ErrorMessageHelper.cpp, 621, Export of a content package failed.
\\?\C:\M-Files Content Packages\Test replication\Out\{8EA7E9B1-34D2-4F60-98B9-53A6BA882330}_20220916_205103\ (0x8004090F)
(M-Files 22.9.11727.0 2022-09-16T17:51:10.176Z)
Job type: Content export
Target: C:\M-Files Content Packages\Test replication\Out\
Vault name: Test replication
Vault ID: {8EA7E9B1-34D2-4F60-98B9-53A6BA882330}
Job execution ID: {574F766F-7601-4366-91AB-9280463F177A}
Solution
There are two known causes for this issue:
- Wrong connection string
- TLS 1.2 not enabled
Wrong connection string
Make sure you have the correct connection string in place.
Using a wrong connection string can cause the same error.
Especially if you have many vaults for which you manage such replication, a mixup may happen.
If in doubt, ask for confirmation of your connection string from M-Files support. NOTE: Never send a connection string directly via email, always send it to us securely via CryptShare.
TLS 1.2 is not enabled
To solve this issue, you need to enable TLS 1.2 on the M-Files server computer.
NOTE: Restarting the M-Files server computer is required, so you need to plan a service break.
You can read more about the necessary registry settings and to find a script to test for them and enable them in the following Microsoft articles:
- https://docs.microsoft.com/en-us/azure/active-directory/hybrid/reference-connect-tls-enforcement
- https://docs.microsoft.com/en-us/mem/configmgr/core/plan-design/security/enable-tls-1-2-server
In summary, set the following TLS 1.2 and .NET registry settings on M-Files on-premise server in order to enable TLS 1.2:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v2.0.50727]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319]
"SystemDefaultTlsVersions"=dword:00000001
"SchUseStrongCrypto"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client]
"Enabled"=dword:00000001
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Server]
"Enabled"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp]
"DefaultSecureProtocols"=dword:00000800
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp]
"DefaultSecureProtocols"=dword:00000800
