Microsoft Content Management Server - Cookie problem

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > May 2005 > Cookie problem





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Cookie problem
Peter Fastré

2005-05-30, 8:47 pm

Hello

I'm converting a standard ASP.Net site (which I built some months ago)
to a MCMS site.

But I keep having problems. In the template aspx I have following code:

HttpCookie ckReferer = new HttpCookie("referer");
ckReferer.Path = "/";
ckReferer.Value = "shitbug";
ckReferer.Domain = "www.siteurl.be";
ckReferer.Expires = DateTime.Now.AddHours(24);

Response.Cookies.Add(ckReferer);

Trace.Warn("De querystring was " + Request.QueryString["referer"]);
Trace.Warn("De cookie is " + Request.Cookies["referer"].Value);
Trace.Warn("De cookie is " + ckReferer.Value);


If I read Request.Cookies, I can never get the value. The exact code
does work in my standard website, but Request.Cookies["referer"] always
returns an empty string.

How can I solve this?

Regards

Peter
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com