Microsoft
Software
Hardware
Network
Question : Classic ASP Cookie Error
At least some of my website visitors (possibly all) are getting the following error when my script is setting the expiry date of a cookie.
It happens the first time a user calls the page, but if they refresh it works fine.
Microsoft VBScript runtime
Type mismatch: 'Response.Cookies'
/locale.asp, line 24
23: Response.Cookies("locale")
= Session("locale")
24: Response.Cookies("locale")
.Expires = DateAdd("m", 6, Now())
I can reproduce the problem and if I view the cookie information in IE developer tools immediately after the error, that cookie exists and the expiry date is correct, ie. 6 months from today.
Answer : Classic ASP Cookie Error
you are assigning Session("locale") into Response.Cookies("locale")
...
seems like for the 1st time Session("locale") does not exist....
during refresh that session gets created and thus does not give any error
Random Solutions
exchange 2010, user has left company, simple way to get all users new emails to different user?
Intel(R) Celeron(R) D CPU 3.06GHz on a Linux machine
How to stablish a proper setup in MS Outlook 2003 encrypting mails
Can't locate DBI.pm in @INC
Office communicator user script
Running the System Update readiness tool.
Searching in Windows 7 Ultimate and Wind 2008 Server how do I search accurately?
OCS 2007 R2 and Cisco call manager
Cisco "Do wr" does not work in "conf t" mode or any other sub-mode
Motherboard driver CD for HCL - P5GD2-TVM/GB/SI