在状态管理Asp.net中,客户端和服务器端究竟是什么意思?为什么cookie是客户端,会话是服务器端 [英] In state Management Asp.net what is exactly client side and server side means ? why cookies are client side and session are server side

查看:149
本文介绍了在状态管理Asp.net中,客户端和服务器端究竟是什么意思?为什么cookie是客户端,会话是服务器端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在州管理Asp.net中,客户端和服务器端究竟是什么意思?为什么cookie是客户端,会话是服务器端

In state Management Asp.net what is exactly client side and server side means ? why cookies are client side and session are server side

推荐答案

服务器端表示托管应用程序的服务器和客户端表示正在尝试使用您的应用程序的用户浏览器。



阅读以下文章,以便全面了解您的想法。 />
1. ASP.NET状态管理建议 [ ^ ]

2. 国家管理在ASP.NET中 - 介绍 [ ^ ]
Server Side means at the Server, where your Application is hosted and Client Side means the User's Browser, who is trying to consume your application.

Read the below articles to have a full picture in your mind.
1. ASP.NET State Management Recommendations[^]
2. State Management in ASP.NET - Introduction[^]


客户端:代码/数据,是否在用户中运行/保存b rowser



服务器端:代码/数据,是否在服务器端运行/保存。



Cookie:

当用户向服务器发送请求时,服务器会创建一个cookie并附加一个标头并将其与响应一起发送回用户。浏览器接受cookie并将其存储在客户端机器上的特定位置



会话:

会话是最常见的方式之一开发人员正在使用它来维护应用程序的状态。 Session基本上将值存储为键/值对中的字典集合。它完全利用服务器资源来存储数据。这是一种安全的数据存储方式,因为数据永远不会传递给客户端。
Client side : Is the code/data, runs/saves in the users browser

Server Side : Is the code/Data, runs/Saves at the server side.

Cookies:
When the user sends a request to the server, the server creates a cookie and attaches a header and sends it back to the user along with the response. The browser accepts the cookie and stores it at a specific location on the client's machine

Session:
Session is one of the most common way which is being used by developers to maintain the state of the application. The Session basically stores the values as a dictionary collection in key/value pairs. It completely utilizes server resources to store the data. It is a secure way of storing data, since the data will never be passed to the client.


客户端状态管理将状态信息存储在客户端计算机上,并且此状态信息必须伴随每个请求到服务器端。相反,服务器端状态管理将状态信息保存在服务器端。

阅读更多: ASP.NET状态管理初学者教程 [ ^ ]
Client side state management stores the state information on the client machine and this state information has to accompany each request to the server side. On the contrary, server side state management keeps the state information on the server side.
Read more: A Beginner's Tutorial on ASP.NET State Management[^]


这篇关于在状态管理Asp.net中,客户端和服务器端究竟是什么意思?为什么cookie是客户端,会话是服务器端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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