Email Confirmation for a new user - can't create a confirmation token

{“ClassName”:“System.Security.Cryptography.CryptographicException”,“Message”
:“The data protection operation was unsuccessful. This may have been caused by not having the user profile
loaded for the current thread’s user context, which may be the case when the thread is impersonating”}

It’s very probably caused by IIS Apppool Settings:

  1. Open your IIS Manager
  2. Find out what AppPool your application is using by selecting your App, right-click on it, and Select Manage Application ->
    Advanced Settings.
  3. After that, on the top left hand side, select Applications Pools, and go ahead and select the App Pool used by your app.
  4. Right-click on it, and select Advanced Settings, Go to the Process Model Section and Find the “Load User Profile” Option and
    set it to true.
1 Like