0

I have a winform application with IE WebBrowser and I want to duplicate the built folder and run 2 instances at the same time. When I do that it seems that in both processes the WebBrowser is using the same cookies. Is there a way to make each process (different exe filename each) to run with isolated cookies so that I can login with different username in each one?

rene
  • 41,474
  • 78
  • 114
  • 152
  • Possible duplicate of [Make .NET WebBrowser not to share cookies with IE or other Instances](https://stackoverflow.com/questions/18195844/make-net-webbrowser-not-to-share-cookies-with-ie-or-other-instances) – rene Dec 19 '17 at 20:22
  • Thanks but that is talking about 2 instances under the same process/program from what I can understand. – Ran Zask Dec 19 '17 at 20:48
  • I expect the solution you need is the same. – rene Dec 19 '17 at 20:59

1 Answers1

0

Your problem isn't the directory structure at all. Your problem is the WinInet Cache (temporary internet files). Your WinInet cache is going to be mostly the same for all applications. Which means all cookies, will be shared across all instances of IE and the web browser control*.

*The exception actually has to do with the process integrity levels. Medium integrity processes get a separate WinInet cache than low Integrity and High Integrity processes.

So within the windows OS you could have a max of 3 different WinInet Caches one for each process integrity level. Anything more than that and you would need to start using virtual machines/containerization.

Actually, looking at the answer given on the duplicate, you might be able to search for more info along those lines and do what you need to do.

Source(s). I used to work on the MS Premier Support for the IESDK team.

Alexander Ryan Baggett
  • 2,347
  • 4
  • 34
  • 61