ISAPI不能共享ASP的Session

MSDN中说的,郁闷,不知道有没有什么其他办法,难道真的用Cookie

INFO: ASP Session Object Can't be Accessed by ISAPI DLLs

SUMMARY

ISAPI filters and extensions do not have access to ASP intrinsic objects. This includes the ASP session object.

MORE INFORMATION

The ASP intrinsic objects, including the session object, are instantiated when Asp.dll processes an ASP page. When ISAPI filters and extensions run, the intrinsic objects for a given session do not exist. For this reason, it is not possible for an ISAPI DLL to access information stored in a session object.

If it is desirable to share information between ASP and ISAPI, and numerous techniques may be used to do so. The best mechanism for sharing data may be through the use of cookies. ASP can set and retrieve cookies as follows:
<% Response.Cookies("VisitorID") = 49 %>
<%= Request.Cookies("VisitorID") %>
    
This can also be accomplished in an ISAPI DLL as described in the following Microsoft Knowledge Base article:
168864 Implementing Cookies in ISAPI
It is also possible to share information between ASP and ISAPI by passing arguments along with the requested URL, resulting in a GET request:
http://server/vdir/some.asp?firstname=Robert&LastName=Duke
    
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值