WPF XBAP Deployment

XBAPs are compiled applications that require the following three files to be deployed:

  • ApplicationName.exe: The executable assembly application file along with required DLLs.
  • ApplicationName.xbap: The deployment manifest.
  • ApplicationName.exe.manifest: The application manifest.

XBAPs can only be used with SQL Server or Oracle databases; not Microsoft Access.

You deploy XBAPs to a Web server, for example Microsoft Internet Information Services (IIS) 5.0 or later versions. You do not have to install the .NET Framework on the Web server, but you do have to register the WPF Multipurpose Internet Mail Extensions (MIME) types and file name extensions.

On the Web server, create a folder/subfolder for each of the XBAP applications:

  • Unit Setup Console (e.g., UnitSetupConsole)
  • Data Entry Admin Console (e.g., DEAdminConsole)
  • Data Entry (e.g., DataEntry)
  • Data Entry Dashboard (e.g., Dashboard)
  • Analysis & Reporting Admin Console (e.g., ARAdminConsole)
  • Analysis & Reporting (e.g., AnalysisReporting)

To prepare the downloaded XBAP for deployment, copy the .exe/DLLs and the associated manifests to the appropriate Web server folder. You will also need to copy to each folder a valid GADSNG.xml file so that the XBAP application can connect to your selected SQL Server or Oracle database.

Create a link for your users to open the deployment manifest, which is the file that has the .xbap extension, such as


When the user clicks the link to the .xbap file, ClickOnce automatically handles the mechanics of downloading and starting the application.

You can deploy an XBAP application from most Web servers, as long as they are configured with the appropriate Multipurpose Internet Mail Extensions (MIME) types. By default, Microsoft Internet Information Services (IIS) 7.0 is configured with these MIME types, but Microsoft Internet Information Services (IIS) 5.0 and Microsoft Internet Information Services (IIS) 6.0 are not.

This topic describes how to configure Microsoft Internet Information Services (IIS) 5.0 and Microsoft Internet Information Services (IIS) 6.0 to deploy WPF applications.

You should adjust the content expiration setting to 1 minute. The following procedure outlines how to do this with IIS.

1. Click the Start menu, point to Administrative Tools, and click Internet Information Services (IIS) Manager.
    You can also launch this application from the command line with "%SystemRoot%\system32\inetsrv\iis.msc".
2. Expand the IIS tree until you find the Default Web site node.
3. Right-click Default Web site and select Properties from the context menu.
4. Select the HTTP Headers tab and click "Enable Content Expiration".
5. Set the content to expire after 1 minute.

You must register several MIME types and file extensions so that the browser on the user's system can load the correct handler. You need to add the following types:

Extension MIME Type
.manifest application/manifest
.xaml application/xaml+xml
.application application/x-ms-application
.xbap application/x-ms-xbap
.deploy application/octet-stream
.xps application/vnd.ms-xpsdocument

      NOTE: You do not need to register MIME types or file extensions on user's systems.

The security settings on your computer determine the access that any Web browsing software is granted. Web browsing software includes any application or component that uses the WinINet or UrlMon APIs, including Internet Explorer and PresentationHost.exe.

Internet Explorer provides a mechanism by which you can configure the functionality that is allowed to be executed by or from Internet Explorer, including the following:

  • .NET Framework-reliant components

  • ActiveX controls and plug-ins

  • Downloads

  • Scripting

  • User Authentication

The collection of functionality that can be secured in this way is configured on a per-zone basis for the Internet, Intranet, Trusted Sites, and Restricted Sites zones. The following steps describe how to configure your security settings:

  1. Open Control Panel.

  2. Click Network and Internet and then click Internet Options.

    The Internet Options dialog box appears.

  3. On the Security tab, select the zone to configure the security settings for.

  4. Click the Custom Level button.

    The Security Settings dialog box appears and you can configure the security settings for the selected zone.

    Security Settings dialog boxPICTURE
Note Note

You can also get to the Internet Options dialog box from Internet Explorer. Click Tools and then click Internet Options.

Starting with Windows Internet Explorer 7, the following security settings specifically for .NET Framework are included:

  • Loose XAML. Controls whether Internet Explorer can navigate to and loose XAML files. (Enable, Disable, and Prompt options).

  • XAML browser applications (XBAP). Controls whether Internet Explorer can navigate to and run XBAPs. (Enable, Disable, and Prompt options).

By default, these settings are all enabled for the Internet, Local intranet, and Trusted sites zones, and disabled for the Restricted sites zone.