I made an application that uses the Asp.Net MVC login system. I tried locally sending the token for email confirmation and it works perfectly, but when I went to Azure in WebApp in the free account for testing purposes I always get this error when I register a new user.
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.
The user is registered but failed to send or generate the same, I noticed that the error always occurs in this line that is in the AccountController class, Register method:
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user.Id);