【发布时间】:2017-05-17 07:25:09
【问题描述】:
我有这个旧的 MVC5 应用程序,它以最简单的形式使用表单身份验证。 web.config 中只存储了一个账号,没有角色等。
<authentication mode="Forms">
<forms loginUrl="~/Login/Index" timeout="30">
<credentials passwordFormat="Clear">
<user name="some-user" password="some-password" />
</credentials>
</forms>
</authentication>
登录例程只是调用
FormsAuthentication.Authenticate(name, password);
就是这样。 asp.net core 中是否有类似的东西(就简单性而言)?
【问题讨论】:
-
使用 FormAuth 进行身份验证与 asp.net 核心不兼容。而是使用身份
标签: c# asp.net-mvc asp.net-core forms-authentication