从ASP会话转移到数据库会话 [英] Moving from ASP Sessions to Database Sessions
问题描述
您好
我们计划建立一个负载均衡的Web环境。因此,我们
将把我们网站上的会话管理从经典的
ASP会话状态和会话变量更改为数据库方法。
是否有任何人对我如何处理这个有任何指示,所以我
可以拥有ASP会话提供的相同功能而无需
为我想要创建的每个会话变量创建数据库列。
我正在思考一些序列化词典或某些东西
我可以坚持blob专栏。
提前致谢
David
Bookham Measures写道:
你好
我们计划建立一个负载平衡的web环境。因此,我们
将把我们的
网站上的会话管理从经典的ASP会话状态和会话变量改为
a数据库方法。
有没有人知道如何处理这个问题,所以
我可以拥有与ASP会话相同的功能
而不必为每个会话变量创建数据库列我想要创建。
我正在考虑一些序列化词典或
我可以坚持使用blob专栏。
提前致谢
David
最简单的:三列,带有变量......。列是varchar:
UserID,VariableName,VariableValue
通过添加DateCreated和/或DateModified可以获得更多功能
专栏
-
Microsoft MVP - ASP / ASP.NET
请回复新闻组。这个电子邮件帐户是我的垃圾邮件陷阱所以我
不经常检查它。如果您必须离线回复,请删除
NO SPAM
" Bookham Measures"写道:
我们计划建立一个负载均衡的Web环境。因此,
我们将把我们网站上的会话管理从
经典ASP会话状态和会话变量更改为数据库方法。
是否有任何人对我如何处理这个有任何指示,所以
我可以拥有ASP会话所提供的相同功能而不需要
必须为每个会话变量创建数据库列我希望
创建。
我正在思考一些序列化词典或
我可以坚持使用blob专栏。
我全心全意地赞同这个决定。这是在多个Web技术(如ASP和ASP.NET)之间共享会话信息的好方法,因为它可以与服务器之间一样好。
>
我们使用两个表:一个是常见的会话信息(会话ID(PK),
会话到期,用户ID(可选)和人口统计(用户代理,IP
地址等。)。另一个包含变量,会话ID和
名称 - 值对。
我们一直在使用这个超过三年,并有一个遗憾 -
这个设计不允许范围限制。我们的下一个版本将有
可选的域名和路径限制,就像饼干一样。
-
戴夫安德森
未经请求的商业电子邮件将以
每条消息500条。使用
这个电子邮件地址的
表示同意这些条款。
Hello
We are planning to set-up a load balanced web environment. Accordingly, we
are going to change the session management on our website from the classic
ASP Session State and session variables, to a database method.
Does any one have any pointers as to how I might approach this, so that I
can have the same sort of functionality the ASP sessions give without having
to create database columns for each session variable I wish to create.
I am thinking along the lines of some serialised dictionary or something
that I can stick in a blob column.
Thanks in advance
David
Bookham Measures wrote:Hello
We are planning to set-up a load balanced web environment. Accordingly, we
are going to change the session management on our
website from the classic ASP Session State and session variables, to
a database method.
Does any one have any pointers as to how I might approach this, so
that I can have the same sort of functionality the ASP sessions give
without having to create database columns for each session variable I
wish to create.
I am thinking along the lines of some serialised dictionary or
something that I can stick in a blob column.
Thanks in advance
DavidThe simplest: three columns, with the "Variable..." columns being varchar:
UserID, VariableName, VariableValue
More functionality can be gained by adding a DateCreated and/or DateModified
column
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don''t check it very often. If you must reply off-line, then remove the
"NO SPAM"
"Bookham Measures" wrote:We are planning to set-up a load balanced web environment. Accordingly,
we are going to change the session management on our website from the
classic ASP Session State and session variables, to a database method.
Does any one have any pointers as to how I might approach this, so that
I can have the same sort of functionality the ASP sessions give without
having to create database columns for each session variable I wish to
create.
I am thinking along the lines of some serialised dictionary or
something that I can stick in a blob column.I wholeheartedly endorse this decision. It''s a great way to share session
information between multiple web technologies (like ASP and ASP.NET), as
well as across servers.
We use two tables: One is common session information (session ID (PK),
session expiration, user ID (optional), and demographics (user agent, IP
address, etc.). The other contains the variables, with session ID and
name-value pairs.
We have been using this for more than three years, and have one regret --
this design does not allow scope limitation. Our next version will have
optional domain & path restrictions, much like cookies have.
--
Dave Anderson
Unsolicited commercial email will be read at a cost of
500 per message. Use
of this email address implies consent to these terms.
这篇关于从ASP会话转移到数据库会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!