title: InternetExplorer.Application object and cookie container
body: <p>I have the following console application written in VB.NET:</p>
  
  <pre><code>Sub Main()
      Dim ie As Object = CreateObject("InternetExplorer.Application")
      ie.Visible = True
      ie.Navigate2("http://localhost:4631/Default.aspx")
  End Sub
  </code></pre>
  
  <p>This program uses the <a href="http://msdn.microsoft.com/en-us/library/aa752084(VS.85).aspx" rel="noreferrer">InternetExplorer.Application</a> automation object to launch an IE window and navigate a given url. The problem that I encountered is that even if I launch multiple instances of my application, the IE windows that are created with this method all share the same cookie container. Is there any parameter I could use specifying that a different cookie container is created for every window?</p>
  
  <p>This is the web page I used to test cookies:</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;script runat="server"&gt;
      protected void Page_Load(object sender, EventArgs e)
      {
          // Store something into the session in order to create the cookie
          Session["foo"] "bar";
          Response.Write(Session.SessionID);
      }
  &lt;/script&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;&lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>