Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Hong Nguyen 3 posts 73 karma points
    Oct 28, 2022 @ 22:18
    Hong Nguyen
    0

    Using IDataProtector with Umbraco

    Hello, I am using Umbraco 9 for my website and using the IDataProtector class to protect and unprotect values for my cookies. Everything works fine on my local machine, but when I publish the site to the Umbraco Cloud, I get this error whenever IDataProtector is trying to decrypt my value(s):

    The provided payload cannot be decrypted because it was not protected with this protection provider.

    My guess is that my site which runs in Umbraco cloud may have different key values because its running on different machines.

    What is the best practice when using Umbraco cloud along with IDataProtector ?

    Do I need to store the key in a local file instead using "PersistKeysToFileSystem " method?

    Any help is appreciated.

Please Sign in or register to post replies

Write your reply to:

Draft