Asp.net MVC认证如何做认证工作 [英] Asp.net MVC Authentication how does the Authentication work

查看:255
本文介绍了Asp.net MVC认证如何做认证工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能是我的问题是疯了。

May be my question is crazy.

1)ASP.net MVC是无状态的,所以没有参与这里的会话。

1) ASP.net MVC is stateless, so there is no session involved in here.

如何验证模块的工作,你有哪些你可以点我明白了基本身份验证的任何物品。

How does the authentication module work and do you have any articles which you can point me to understand the Authentication basics.

哪些存储在认证信息

[新手MVC]

推荐答案

该网站是无状态的。 ASP.NET和ASP.NET MVC有创建应用程序状态的机制。 MVC的倡导者喜欢,它为开发人员提供了如何请求状态的管理和如何影响比Web窗体的托管状态的控制。 Web窗体封装与的ViewState 这不是MVC的一部分状态。 MVC模式,可以控制每一个动作(包括管理应用程序状态)在一个更精细的水平。这可能是你得到的想法,MVC是无状态的。

The web is stateless. Both ASP.NET and ASP.NET MVC have mechanisms for creating an application state. Advocates of MVC like that it provides the developer with more control over how state is managed and how requests affect the managed state than Web Forms. Web Forms encapsulates state with ViewState which is not part of MVC. The MVC pattern allows you to control every action (including managing the application state) on a much more granular level. This is probably where you got the idea that MVC is stateless.

作为一个方面说明,你应该倾向于使用 TempDataDictionary HttpSessionState 来存储状态相关数据,因为默认实现TempDataProvider是一个包装的 HttpSessionState )。该模式是有点不同,但好文章可以在<一个找到href=\"http://www.gregshackles.com/2010/07/asp-net-mvc-do-you-know-where-your-tempdata-is/\">http://www.gregshackles.com/2010/07/asp-net-mvc-do-you-know-where-your-tempdata-is/

As a side note, you should favor using the TempDataDictionary over HttpSessionState for storing state-related data, because the default implementation the TempDataProvider is a wrapper of the HttpSessionState). The pattern is a little different but a good article can be found at http://www.gregshackles.com/2010/07/asp-net-mvc-do-you-know-where-your-tempdata-is/

ASP.NET(和MVC)的认证通常通过利用窗体身份验证 。它可以在你的的web.config 进行配置。 ASP.NET验证配置

ASP.NET (and MVC) authentication usually works by leveraging Forms Authentication. It can be configured in your web.config. ASP.NET Authentication Configuration.

如果您的客户端浏览器支持Cookie,默认行为是被存储在cookie中的身份验证票证。

If your client's browser supports cookies, the default behavior is for your authentication ticket to be stored in a cookie.

这篇关于Asp.net MVC认证如何做认证工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆