【发布时间】:2013-03-16 14:10:24
【问题描述】:
我有一个通用处理程序,我想根据一些查询字符串自动登录。
然后我设置了 FormsAuthentication.SetAuthCookie(user.Name, false),但是 HttpContext.Current.User.Identity.IsAuthenticated 返回 false,由于 web.config 中设置的限制,我无法重定向。
那么如何在 .ashx 文件中设置 FormsAuthentications?
【问题讨论】:
-
你想用那个 ashx 作为登录方式吗?
标签: forms-authentication ashx formsauthentication generic-handler