我正在使用MVC3,并将用户身份验证放在了web.config文件中。这是为了绕过sqlserver身份验证。
在web.config中的代码如下:
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" >
<credentials passwordFormat="Clear">
<user name="test123" password="test123" />
</credentials>
</forms>
</authentication>
我尝试使用提到的用户id和密码登录,在页面中出现错误,因为
登录失败。请更正错误,然后重试。
* The user name or password provided is incorrect.
当我调试到AccountController.cs文件时,MembershipService.ValidateUser(model.UserName, model.Password)
方法失败。
https://stackoverflow.com/questions/5342305
复制相似问题