The WinFX online SDK has a nifty little article that explains how to configure IIS to serve up WPF (aka Avalon) content. At the heart of this article is the fact that the following 5 extension-MIME type mappings need to be made:
Extension |
MIME Type |
.manifest |
application/manifest |
.xaml |
application/xaml+xml |
.application |
application/x-ms-application |
.xbap |
application/x-ms-xbap |
.deploy |
application/octet-stream |
The instructions in the article work like a charm if you’re (1) running IIS and (2) have administrative capabilities on your server.
Since I’m just paying a company in Texas for a bit of space on the web, I am (1) running Apache and (2) only have my little non-privileged user account. But if you are like me, do not despair! Eric, one of the developers on my team, realized that one could do the MIME-type mapping by adding the following lines to his/her .htaccess file:
AddType application/manifest manifest
AddType application/xaml+xml xaml
AddType application/x-ms-application application
AddType application/x-ms-xbap xbap
AddType application/octet-stream deploy
I just tried this out, et voila, now I can deploy XBAPs from my site. If you have the December CTP installed (if not, go get it here), here’s a Hello World for you to try out.
Update 2/9/06 11:45am: One of my co-workers reported that he had to put a period before the extension (e.g. “.xaml” rather than “xaml”) in his .htaccess file to get this working on his server. YMMV.