Cookie和授权 [英] cookie and Authorization
本文介绍了Cookie和授权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的应用程序中,我想对每个请求和响应都使用cookie,以及授权,当他请求应用程序中的任何页面时,我希望重定向到登录页面的任何人都可以在此提供帮助. />
预先谢谢您....
in my application i want to use cookie for every request and response, and Authorization, when he request any page in the application i want that redirect to login page can anybody please help in this.....
thank you in advance....
推荐答案
最简单的方法是实现成员身份-IIS将处理将未经授权的用户踢到登录页面的情况. /> MSDN上有一个很好的教程: http://msdn.microsoft.com/zh-CN -us/library/yh26yfzy(v = vs.85).aspx [
The easiest way to do this is to implement Membership - IIS will then handle kicking unauthorised users to the login page.
MSDN has a good tutorial: http://msdn.microsoft.com/en-us/library/yh26yfzy(v=vs.85).aspx[^]
因此,如果正确理解,则希望cookie执行身份验证和授权.
这称为自定义表单授权,这是您的操作方式
了解并实现ASP.NET自定义表单身份验证 [ ^ ]
So if understood correctly you want cookies to perform authentication and authorization.
This is called custom forms authorization and here is how you do it
Understanding and Implementing ASP.NET Custom Forms Authentication[^]
这篇关于Cookie和授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文