在asp.net中cookie会话

编程入门 行业动态 更新时间:2024-10-28 07:29:24
本文介绍了在asp中cookie会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我最近挖约Cookie会话,我来到翻过它说,每当在服务器上创建会话,它的ID存储在cookie,那么客户机上,我被认为在我大学的文章,会议存储在服务器上,如果会话ID是饼干和曲奇存储在本地客户机,人怎么能说会话都存储在服务器上,是这样吗,那会被存储在服务器上?如果是的话那么什么是Cookie会话的概念,任何人都可以解释我

i was recently digging about cookieless sessions, i came accross an article which says that whenever the session is created on the server, its ID is stored in the cookies, on the client machine, i was being thought in my college that sessions are stored on the server, and if the sessionID is in cookies and cookies are stored in clients machine locally, how one can say that session are stored on server, is that right, that sessions are stored on server? if yes then what is the concept of cookieless session, can anyone explain me

推荐答案

会话状态是(几乎总是)存储在服务器上,它是由一个随机数标识,会话令牌。

Session state is (almost always) stored on the server, and it is identified by a random number, the session token.

这令牌需要由客户端存储,并送他的HTTP请求沿着服务器(使服务器能够记得他以前见过他与会话请求关联的)。

That token needs to be stored by the client, and sent to the server along with his HTTP requests (so that the server can remember that he has seen him before and associate the session to the request).

怎么可以说都存储在服务器会话,是这样吗,那会被存储在服务器上?

how one can say that session are stored on server, is that right, that sessions are stored on server?

只有会话令牌被存储在客户机上,并且因为它是一个随机数,它不包含在本身的任何有用的信息。它仅一起变得有价值与存储在服务器上的数据。

Only the session token is stored on the client, and since it is a random number, it does not contain any useful information in itself. It only becomes valuable together with the data stored on the server.

如果是的话那么是什么Cookie会话的概念

if yes then what is the concept of cookieless session

保存令牌的最简单方法是使用cookie。这就是饼干被发明了。替代品的发放饼干来回使用隐藏表单变量或URL的一部分。

The easiest way to store the token is using cookies. That is what cookies were invented for. Alternatives are handing the cookie back and forth using hidden form variables or as part of the URL.

更多推荐

在asp.net中cookie会话

本文发布于:2023-11-09 22:35:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573616.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:asp   net   cookie

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!