suspicious cookie in trace

  • Thread starter Thread starter A.M
  • Start date Start date
A

A.M

Hi,

When I enable trace in my asp.net application, I always have a cookie called
"reportPreview" with the value "(viewer=0)".
My code doesn't add such cookie.
How can I know who adds that cookie to cookie list?

Thanks,
Ali
 
Hi Ali,

From your description, you found there exists an unknown cookie named
"reportPreview" in your web application's trace info report. So you're
wondering how to troubleshoot it to find the creator of it, yes?

As for this problem, here are my suggestions:
1. I'm not sure whether you've used any third-party component(printing or
report component?) which is likely to use a cookie like this one.

2. You may try removing this cookie, via code or manually clear the certain
cookie file in the internet temporary folder. By code, you can try the
following means:

Response.Cookies["reportPreview"].Expires = DateTime.Now.AddDays(-1);
or just Response.Cookies.Clear() to remove all the cookies.

Then, refresh the pages and navigator all the pages one by one(with trace
enabled in all pages) to see in which page the certain cookie is generated.
Do you think so?

In addition, here is a tech article on ASP.NET cookie fundamental, hope
also helpful:

#Basics of Cookies in ASP.NET
http://msdn.microsoft.com/library/en-us/dv_vstechart/html/vbtchaspnetcookies
101.asp?frame=true


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
We do use Crystal Reports in our application. My guess is the crystal report
html based report viewer creates the cookie and doesn't properly manage it;
so I always have the cookie in the session!!

Thanks for help,
Ali
 
Back
Top