当我调用Request.ServerVariables(“remote_host”)时,“类不支持自动化”错误

时间:2021-10-09 05:02:18

I'm in the process of writing a basic cookie for an ecommerce site which is going to store the user's IP among other details.

我正在为电子商务网站编写一个基本cookie,用于存储用户的IP以及其他细节。

We'll then record the pages they view in the database and pull out a list of recently viewed pages.

然后,我们将记录他们在数据库中查看的页面,并提取最近查看过的页面列表。

However i'm having an issue with the following code.

但是我遇到以下代码的问题。

dim caller
caller = Response.Cookies("caller")
if caller = "" then 
    caller = Request.ServerVariables("remote_host")
end if  

On running this, i get the following error message.

运行此,我收到以下错误消息。

"Sun ONE ASP VBScript runtime (0x800A01AE) Class does not support automation"

“Sun ONE ASP VBScript运行时(0x800A01AE)类不支持自动化”

Any ideas? Google has nothing obvious.

有任何想法吗?谷歌没有什么明显的。

1 个解决方案

#1


1  

Should be Request.Cookies when checking the value.:

检查值时应该是Request.Cookies:

dim caller
caller = Request.Cookies("caller")
if caller = "" then 
    caller = Request.ServerVariables("remote_host")
end if

#1


1  

Should be Request.Cookies when checking the value.:

检查值时应该是Request.Cookies:

dim caller
caller = Request.Cookies("caller")
if caller = "" then 
    caller = Request.ServerVariables("remote_host")
end if