在经典ASP中设置SessionId? [英] Set SessionId in Classic ASP?

查看:78
本文介绍了在经典ASP中设置SessionId?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在PHP中,我可以通过使用Session_id()作为设置器来选择使用特定的会话.

In PHP I can choose to use a particular Session by using Session_id() as a setter.

经典ASP/VBScript中是否有任何类似的功能?我有一个VBScript网站,具体取决于页面,可以直接从浏览器中调用,也可以通过HTTP内部调用.不幸的是,ASP将它们视为两个单独的会话,因为用户的计算机调用一个会话,而服务器本身调用另一个会话.我想告诉服务器调用嘿,使用会话123456",以便它可以与用户调用页面直接共享信息.

Is there any similar functionality in Classic ASP/VBScript? I have an VBScript site that, depending on the page, is either called directly from the browser or internally via HTTP. Unfortunately ASP treats these as two separate sessions, because the User's computer calls one and the Server itself calls the other. I want to tell the Server calls, "Hey, use Session 123456" so it can share info with the user calling pages directly.

有什么建议吗?有什么方法可以更改或命名页面上正在使用的会话?

Any advice? Any way to change or name the Session being used on a page?

推荐答案

在ASP Classic中,没有像PHP的Session_id()这样的内置方法.

There's no built-in method like PHP's Session_id() in ASP Classic.

ASP的Session对象具有严格的锁定机制,可以保证状态的一致性,因此可以防止您在同一应用程序池中使用相同的会话标识符提出其他请求.

ASP's Session object has a strict locking mechanism that guarantees consistency of the state, so this prevents you to make additional requests with the same session identifier within the same application pool.

另一方面,很容易实现一个网桥,以便与同一域下的其他平台(如PHP)共享会话状态.

On the other hand it's easy to implement a bridge to share the session state with a different platform like PHP under the same domain.

如何从PHP访问ASP经典会话变量?

这篇关于在经典ASP中设置SessionId?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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