Every time I run my WBF Browser Application sample I get the following error:

To be more precise, I get the error after I close IE that is running the application. I suppose this is caused by the fact that .NET Framework 3.5 is still in beta (2). For the moment, I am more interested in finding out what PresentationHost.exe has to do with my WBF Browser Application.

Here is what I found on MSDN about PresentationHost.exe:

Windows Presentation Foundation (WPF) Host (PresentationHost.exe) is the application that enables WPF applications to be hosted in compatible browsers (including Windows Internet Explorer 7 and Microsoft Internet Explorer 6). By default, Windows Presentation Foundation (WPF) Host is registered as the shell and MIME handler for browser-hosted WPF content, which includes:
         - Loose (uncompiled) XAML files (.xaml).
         - 
WPF browser application (XBAP) (.xbap).

When a .xbap file is called, here is what happens: 

  1. IE realizes that for that mime type PresentationHost.exe should be loaded into IE as the DocObject that knows how to render xaml content.
  2. PresentationHost.exe launches the registered HTML handler to host the WPF content.
  3. PresentationHost.exe loads the right versions of the required CLR and WPF assemblies.
  4. PresentationHost.exe ensures the appropriate permission levels for the zone of deployment are in place.

This is the same technology that allows Word documents to be loaded inside of IE.

So, PresentationHost.exe is the engine behind every XAML Application. One down! What about the error?

Related posts:

  1. What is a WPF Browser Application? When I created my first application using Visual Studio 2008...
  2. Deploying a WPF Browser Application When you build a WPF Browser Application (see my...
  3. Implementing a WPF Browser Application WPF Browser Applications, a.k.a. XAML Browser Applications, are Windows Presentation...
  4. Silverlight(WPF/E) vs WPF Browser Application(XBAP) The other day I posted some definition for a WPF Browser...
  5. WPF ClickOnce Deployment First, some info from MSDN:   ClickOnce deployment allows you...