Forms Authentication understanding context.user.identity

前端 未结 4 466
孤城傲影
孤城傲影 2020-12-01 09:40

Since documentation on this process is very vague and confusing (or old), I wanted to verify that I was doing it correctly and not missing any steps.

I am trying to

4条回答
  •  抹茶落季
    2020-12-01 10:21

    There's a problem in your authorization tag, should be:

    
      
      
    
    

    because you want to deny anonymous users. If you fix this, you can safely remove all the stuff from the master page and global.asax - you don't have to remap the forms identity to your own custom identity stored in session. It's the waste of resources and I don't think it raises the security of your solution in a significant way. You can rely on the forms cookie.

提交回复
热议问题