字典中不存在给定密钥。获取用户记录时出错

时间:2019-04-11 05:58:27

标签: c#

returnUrl = returnUrl ?? string.Empty;
var startTime = DateTime.UtcNow;
try
{
    var user = await DataRepository.GetAsync<IUserIdentity, ICustomer>(Identities.Anonymous, email);
    if (user != null && user.IsActive && Password.Validate(password, user.PasswordHash) && user.HasPermission(Permission.ShipbeatSupport))
    {
        FormsAuthentication.SetAuthCookie(user.Id.ToString(), remember);
        return SigninRedirect(returnUrl);
    }

    Logger.Security("Failed to authenticate user: {0}", email);
}
catch (Exception exception)
{
    Logger.Security(exception, "Failed to authenticate user: {0}", email);
}

尝试通过电子邮件获取用户群时出现错误。

0 个答案:

没有答案