0
扔在我的自定义成员船供应商我对的ValidateUser和事物提供的实现是迄今罚款,但现在突然了passwordFormat已经开始投掷NotImplementedException通过了passwordFormat在定义成员资格提供
NotImplementedException是由用户代码
未处理
我的web.config或自定义成员身份没有变化。一些堆栈溢出问题的答案是在Web.config中的system.web下添加角色管理器,但它对我无效。另外,我尝试了Josh here提出的答案,但仍然没有区别。我正在使用十六进制编码。其他除的ValidateUser的
没有在我的自定义成员资格,这是因为遵循
public override bool ValidateUser(string username, string password)
{
LoginModel model = new LoginModel
{
UserName = username,
Password = password,
ErrorMessage = ""
};
User user = UserManager.AuthenticateUser(model);
if (user != null)
{
HttpContext.Current.Items.Add("User", user);
return true;
}
return false;
}