没有密码的 Asp.net 成员(member)授权

标签 asp.net asp.net-membership facebook

要在 Asp.net Membership 中对用户进行身份验证,我们可以调用方法

FormsAuthentication.Authenticate(username, password)

我如何在没有用户密码的情况下完成相同的工作(生成 session 、cookie 和 Authenticate 执行的所有其他工作人员)?

我正在尝试通过 facebook 连接登录用户。用户的 facebook id 存储在用户数据中。用户应像普通用户一样登录。

最佳答案

我认为您可以使用 SetAuthCookie 方法。

更多信息在这里 http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.setauthcookie.aspx

关于没有密码的 Asp.net 成员(member)授权,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1871010/

相关文章:

c# - 在没有 Redis 的 Azure 上运行的 ASP.NET Core 应用程序中缓存数据

asp.net-mvc-4 - 使用 ASPNetUsers 表创建两个连接表或扩展 ASPNETUsers 表?

c# - 你必须调用 "WebSecurity.InitializeDatabaseConnection"但我知道

facebook - Cordova facebook OAuth 登录问题

ios - 如何判断用户是否已在 iOS 上登录 Facebook?

c# - ASP.NET 路由 - 带数据库查找的路由约束

c# - 在 asp.net 网站中为多个 session 用户交换内容

php - Facebook 实时更新

asp.net - 我不断收到 "docker build"需要 1 个参数的错误

asp.net - 为什么CreateUserWizard Control会自动添加ASPNETDB.MDF数据库?