Groups | Blog | Home
all groups > asp.net > march 2004 >

asp.net : suspicious cookie in trace


A.M
3/22/2004 11:38:47 PM
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

v-schang NO[at]SPAM online.microsoft.com
3/23/2004 7:09:14 AM
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



A.M
3/25/2004 9:45:07 AM

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



[quoted text, click to view]

v-schang NO[at]SPAM online.microsoft.com
3/25/2004 12:36:33 PM
Hi Ali,

Have you had a chance to check out the suggestions in my last reply or have
you got any further progress on this issue? If you have any questions,
please feel free to post here. Thanks.

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
AddThis Social Bookmark Button