Cookie problem...

I'm having real problems with an ASP page that sets a User's preferences on an app I wrote about a year ago. It worked OK then but for some strange reason it doesn't now!

The code, which is at the top of an ASP page and before the HTML tags, is as follows:

<%@ Language=JavaScript %>

<%
// Set Cookie expiry date...
var nextyear = new Date();
nextyear.setFullYear(nextyear.getFullYear() + 1);
Response.Cookies("KeySettings").Expires = nextyear.toLocaleDateString();

It then goes on to set various keys, although even this doesn't work now - even if I comment out the bit above!

Instead I get the message:

Error Type:
Microsoft JScript runtime (0x800A000D)
Type mismatch
/SetUserSettings.asp, line 7

By the way, Line 7 is the line:
Response.Cookies("KeySettings").Expires = nextyear.toLocaleDateString();

I then have to close the page manually.

I'm developing this using InterDev and IIS 5.0.

Any help would be appreciated. Many thanks.
[1092 byte] By [andyg] at [2007-11-19 1:47:49]
# 1 Re: Cookie problem...
Just a thought...

I've recently installed MS .NET (was using Visual Studio 6.0 and InterDev) - could .NET have changed anything in IIS that would make it expect ASP.NET instead of "ordinary" ASP?

I thought that both could run side by side on a Server as ASP.NET files have an .aspx suffix instead of .asp.

Any thoughts, experiences etc ?

andyg
andyg at 2007-11-8 0:20:07 >