0
I made an application that uses the Asp.Net MVC login system. I have tested locally the sending of the token for e-mail confirmation and it works perfectly, but when I went up to Azure in the Webapp in the free account for test afim always I get this error when I will 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 realized that the error always occurs in this line that is in the Accountcontroller class, Register method:
var code = await _userManager.GenerateEmailConfirmationTokenAsync(user.Id);
From the context of the message, you are trying to send an email to a user who "does not exist" (because it is not yet logged in, hence the system does not know who to send it to).
– Uilque Messias
@Uilquemessias, pointed out the error well, but to remove all doubt post the code please Robz so that we have possibilities to point out the problems.
– user46523