Deploying Windows Presentation Foundation (WPF) Browser Application (XBAP) on Internet Information Services (IIS) By: Jojo Sardez (03/31/2010

) Deploying a WPF Browser application (XBAP) on IIS is similar to hosting a deployment files of an application deployed via ClickOnce. XBAP uses the ClickOnce technology on its deployment. The difference is that it only runs in full trust ClickOnce Security Settings so it is necessary that the client machines must have the pfx file of the application installed on its Certificates’ Trusted Root Certification Authorities and Trusted Publishers directories On this article I will cover deploying a WPF XBAP Application on a separate site hosted in IIS7 running on Windows Server 2008 platform. I will first cover setting up the web site on IIS. On your Windows Server machine, verify if the role Web Server and Feature .NET Framework 3.0 Features are added on the Server Manager. If it’s not you should add them first.

Figure 1: Windows Server 2008’s Server Manager Window. Next go to Control Panel > Administrative Tools > and double click Internet Information Services (IIS) Manager to open IIS Window.

Figure 2: The Internet Information Services (IIS) Manager Next step involves adding a new web site. Right click the Sites node and select Add Web Site. On the Add Web Site window, specify the websites properties like name, path, etc. You should also change the Port specified there since the default value of 80 is used by the Default Web Site.

Figure 3: The Add Web Site window. After clicking the OK button, you should now be able to see the newly created web site under the Sites node.

Figure 4: The newly created web site listed under IIS’s the Sites node. The next you need to do is to deploy your XBAP application on the newly created web site. On Visual Studio IDE, publish your WPF Browser Application Project by right clicking the project on the Solution Explorer and select Publish.

Figure 5: Publishing a WPF Browser Application to a specified location. Note: If you are publishing on the same PC or the path of the web site is shared on network you could directly select the path of the web site on the Specify the location to publish this application and skip the next step. Just make sure the site is Stopped while you are publishing to avoid Access Denied error. Next, Stop the web site from IIS if it is started then copy the published files and paste in on the web site’s path. You may also like to add your XBAP file on your websites Default Document so the users can just specify the URL of the web site on the browser and not full path of the XBAP file when using the application.

Figure 6: The XBAP file added on the web site’s Default Documents. The last step is to test if the XBAP Application is correctly deployed. On IIS Manager, Click the Browse link of the web site to see if it displays your WPF Browser Application on Internet Explorer.

Figure 7: The XBAP application hosted on IIS