首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >web.config中的表单身份验证

web.config中的表单身份验证
EN

Stack Overflow用户
提问于 2011-03-18 00:43:40
回答 1查看 27.3K关注 0票数 18

我正在使用MVC3,并将用户身份验证放在了web.config文件中。这是为了绕过sqlserver身份验证。

在web.config中的代码如下:

代码语言:javascript
复制
<authentication mode="Forms">
      <forms loginUrl="~/Account/LogOn" timeout="2880" >
        <credentials passwordFormat="Clear">
          <user name="test123" password="test123" />
        </credentials>
      </forms>
</authentication>

我尝试使用提到的用户id和密码登录,在页面中出现错误,因为

登录失败。请更正错误,然后重试。

代码语言:javascript
复制
* The user name or password provided is incorrect.

当我调试到AccountController.cs文件时,MembershipService.ValidateUser(model.UserName, model.Password)方法失败。

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/5342305

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档