如何检索 ASP cookie 的 'Expires' 属性 的值?

How to retrieve value of 'Expires' property of ASP cookie?

我在 ASP 中创建了一个名为 language 的 cookie,它被设置为字符串 "VBScript"。我已经附加了一个 Expires 属性 到 #May 1,2016# 的值。我能够检索到 cookie 的值,但在检索到期日期时遇到问题。这是 ASP 代码:

<%
    response.write("Cookie: " & Request.Cookies("language")) ' outputs 'VBScript' 
    response.write("Expiration Date: " & Request.Cookies("language").Expires) ' possible line of error
%>

当我 运行 这段代码时,在 cookie 的值旁边,它说 'An error occurred while processing the URL. Please contact the system administrator. If you are the system administrator click here to find out more about this error.' 'here' 部分是 link 到 Microsoft 网站。我可能会考虑删除 'possible line of error',但在这种情况下有没有办法检索 cookie 的过期日期?

更新:

删除 'possible line of error' 只是删除了错误消息并显示了 cookie 的值。

发件人:Response.Cookies Collection

Expires
Write-only. The date on which the Cookie expires. This date must be set in order for the Cookie to be stored on the client's disk after the session ends. If this attribute is not set to a date beyond the current date, the Cookie expires when the session ends.

这是一个只写值,无法从中读取。

并且 Request.Cookies 集合没有名为 Expires 的键。