04.15.07
XBAP Deployments

First, using Visual Studio, I published the application to an IIS Virtual Directory on my local computer. A brief test showed that just this step was not sufficient for me to view my app in any version of Internet Explorer.
Typically (as in my case) some minor configuration changes are required to IIS in order to successfully access an XBAP application. Microsoft has instructions for this on the MSDN website. Essentially there are just two steps: (1) Set Enable Content Expiration to one minute and (2) register a series of Mime types. For your convenience Microsoft has provided a .vbs script that will register the mime types for you automatically if you simply run it from a command window. As soon as I finished these two steps, I was able to successfully view my locally deployed XBAP application in both IE 6 and 7.
Next I uploaded my application (via FTP) to a Unix web server (running Apache) where we host some of our web content. I was pleasantly surprised to see that without any configuration changes I was able to see my application using IE 7. However, IE 6 showed me some XML text (as of course did Firefox) instead of the actual content of my application.
The documentation for our web server suggested using the AddType method in the httpd.conf file so I added the following lines to this file:
AddType application/manifest .manifest
AddType application/xaml+xml .xaml
AddType application/x-ms-application .application
AddType application/octet-stream .deploy
AddType application/x-ms-xbap .xbap
AddType application/vnd.ms-xpsdocument .xps
Then I uploaded the revised version of httpd.conf to my website and restarted Apache.
This solved the problem for IE 6, although Firefox still won’t display XBAP applications. However, I did have to close IE 6 and reopen it to flush its cache before it worked correctly.
Also, with the Mime types now registered, Firefox displays a download prompt instead of the contents of the manifest. Since downloading this file with Firefox is pointless, I decided to put a page in my website which explains the requirements of an XBAP application (Internet Explorer 6 or 7 and .NET 3.0) Instead of giving out a link directly to the XBAP application I will give people a link to my gatekeeper page from which they can then proceed to my XBAP applications. Anyone who doesn’t meet the requirements can simply download and install them before attempting to access my XBAPs. More importantly if anyone experiences a problem viewing any of my XBAPs, he will have an explanation of what is causing this problem and how to solve it.
