Hi everyone,
I'm using IDataProtectionBuilder to encrypt/decrypt data, and because the application is split on several machines I'm using as you can see it below.
services.AddDataProtection()
.PersistKeysToFileSystem(new DirectoryInfo(@"\\SharedKeyFolder"))
.SetDefaultKeyLifetime(TimeSpan.FromDays(30))
.SetApplicationName("ApplicationName");
My issue is that when I encrypt with machine 1 and decrypt with machine 2, the machine 2 throws an exception that cant find the key.
I'm missing something from the configuration ?
Thanks,
Mircea
Later Edit:
Seems like is working, after further investigation the cause was made of an old deployment that didn't had Certificate with NetworkPath.