b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

.aspxauth_aspx cs_aspx是什么文件

电脑杂谈  发布时间:2017-06-07 18:03:34  来源:网络整理

aspx cs_aspx是什么文件_.aspxauth

For a web application I switched from using ASP.NET Membership to using my own log in system which just does something like this to mark a user as logged in:

Session["UserId"] = User.Id

Is it possible to store the user id in the ASPXAUTH cookie, piggybacking on its encryption, instead of using the standard session?

The goal is for the logged in state to last longer than a session and survive both browser and server restarts.

Update: The original answer provided was with a project using MembershipProvider and it's explained in the answer itself. I, the asker, am not using it, so the answer to my problem was slightly different but extracted from this answer. I'm putting my answer at the bottom for anyone that cares and leaving the original verbatim, as it contains a lot of value.

Yes, you can use FormsAuthentication for your own strategy. And while the asp.net db structure does not suit you, you may provide a implementation of MembershipProvider to allow use of the Membership infrastructure. These two functionalities are not married so you may decide what fits for you.

Keeping in mind your question and some of the comments, here is a runnable example of how it is to leverage the provider model without being married to the default implementations and db schemas.

Using forms auth for your own purposes is . You just need to provide authentication and set your own ticket (cookie).

Using custom membership is almost as . You can implement as little or as much of the provider as you need to support the asp.net infrastructure features that you would like to employ.


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-51660-1.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 陈文述
      陈文述

      当初在西湖边忽悠外国老人

    • 赵静怡
      赵静怡

      为什么要彼此伤害

      • 欧阳涵
        欧阳涵

        集体向520万刷起来集体心意送给烊烊生日礼物#易烊千玺##易烊千玺真的很不错##全员即刻加速1128迈#

    • 张树峰
      张树峰

      朦胧花季

    热点图片
    拼命载入中...