Friday, March 16, 2012

New iexplore.exe processes exit immediately and the page loads in a different process!

As part of some process management software that handles multiple web pages and web-based applications, I recently encountered some problems with Internet Explorer.

The symptoms of my problem:

  1. Attempt to launch a new page/web-app in a separate iexplore.exe process for Internet Explorer
  2. The process launches successfully but very quickly exits with rc=0.
  3. A new iexplore.exe is created that is not a child of the process I created, but of another existing Internet Explorer session.
  4. The requested content appears successfully under that other process
  5. My process/handle management logic is confused since it thinks something is broken!

After a brief amount of research, it turns out this is due to a change in Internet Explorer 8 (IE8) regarding how UI components, frames, tabs, and plug-ins are isolated into different processes. This is called "loosely-coupled Internet Explorer" or LCIE, and this is documented in two MSDN IE blog posts from Microsoft:

  • http://blogs.msdn.com/b/ie/archive/2008/03/11/ie8-and-loosely-coupled-ie-lcie.aspx
  • http://blogs.msdn.com/b/askie/archive/2009/03/20/how-to-i-determine-which-ie-tabs-go-to-which-iexplore-exe-process-when-using-internet-explorer-8.aspx

While these changes are very useful from an end user point of view, for security and robustness reasons, they aren't what I need. Thankfully, Microsoft included a way of avoiding some aspects of this change in IE8 to mimic the process behaviour of previous versions:


The simple solution:

When manually launching an iexplore.exe process, add the following "-nomerge" command line option as part of the request.

"iexplore.exe -k -nomerge C:\path\app\index.html"

Once I modified my process manager to use this option, my existing logic that worked fine under IE6 and IE7 also works with IE8!