views:

259

answers:

2

I've got a web site that I use to sell a downloadable .net 2.0 Windows Forms application. I use Google Analytics to analyze site traffic. The .net 2.0 application has an embedded WebBrowser control. One way I use the WebBrowser, for example, is to show the customer a page on my web site where they can register their email address. Based on my experiments with IE8 on Vista, it appears that cookies are NOT shared between the WebBrowser control and IE8. One simple experiment that seems to verify this is to log on to Amazon with IE and then notice that the WebBrowser control requires you to log on again. That means that Google Analytics - which relies on cookies - can't help me identify which ads led to e-mail address acquisition inside my client. In other words, I can't use Google Analytics to analyze activity across both the web site and within the downloaded application. Based on some other posts, it appears some people have the opposite problem - cookies are shared between IE and the WebBrowser control.

Under what conditions are cookies shared between IE and the WebBrowser control? Is this behavior specific to a particular version of IE and .net? Is there a way to force sharing of cookies?

My conclusion so far is that if I really want to use Google Analytics to correlate web site traffic with activity inside my client application, then the best I can do is cause my client application to launch the full blown web browser, and NOT rely on the embedded WebBrowser control. For example, there might be a link within my program called "Get email updates" that launches IE to a specific page on my web site.

A: 

IE 7 and 8 on Vista+ run as a low integrity process by default. Your WinForms app probably runs as a medium integrity process. I don't think cookies are shared between integrity levels. What happens if you launch your app as a low integrity process?

jeffamaphone
In my case this won't work. The program is an administrative tool for parents that must run with elevated privileges.
JustinM
Well, you could test it to verify that this is the problem. If so, I'm not sure there will be a good solution.
jeffamaphone
A: 

hi, i have the same problem, i have an app in c# with a webbrowser control but i cant access to cookies in C:\Users\Me\AppData\Roaming\Microsoft\Windows\Cookies\Low.

i try this http://support.microsoft.com/kb/2278183

and whola! i can access to the cookies, but if i click on one link to open a new browser window nothing happens :(.

Luis