Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cookie problem...

Status
Not open for further replies.

gats

Programmer
Aug 11, 2004
6
GB
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.
 
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top