Microsoft Content Management Server - cookie problem

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > June 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-06-01, 2:48 am

Is there no-one who can help me with my problem? I really need to get
this solved, and I think I tried about everything there is to try?

Please help.


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
Chester Ragel

2005-06-01, 7:47 am

Hi Peter,

Can you create a new Cms web application and check your code? I checked it
in my machine and your code works fine.

Cheers,
Chester.

"Peter Fastré" <peter.fastre@belgacom.net> wrote in message
news:31ene.107162$k57.6462564@phobos.telenet-ops.be...
> Is there no-one who can help me with my problem? I really need to get
> this solved, and I think I tried about everything there is to try?
>
> Please help.
>
>
> 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



Peter Fastré

2005-06-01, 7:48 am



Chester Ragel wrote:
> Hi Peter,
>
> Can you create a new Cms web application and check your code? I checked it
> in my machine and your code works fine.
>


Tried doing that, even moved the website to another machine. No result,
Request.Cookies["referer"] gives an empty string.

This code worked with the static (normal asp.net) version, so I assume
there's nothing wrong with it.

I hope someone can give me the answer of this XXXXing problem, site has
to go live in a few days

Thanks for your help

Peter
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com