Launching a different content type from a SCORM package

Topics: Developer Forum
Coordinator
Oct 30, 2006 at 11:23 PM
I'm trying to launch a Xaml Browser Application from SLK. The appropriate section of my imsmanifest.xml file looks like:

<resources>

<resource identifier="XBapLaunch" type="webcontent" href="xbap/webplayback.xbap?Project1.gxml">
<file href="xbap/webplayback.exe" />
<file href="xbap/webplayback.exe.manifest" />
<file href="xbap/webplayback.xbap" />
</resource>

<resource identifier="project1" >
<file href="xbap/project1.gxml" />
</resource>

</resources>

This loads and displays the TOC as expected in SLK, but when I navigate to the TOC node for the XBap, my browser renders the XML in webplayback.xbap rather than invokes the XBAP. I think this is probably because the MIME content type posted back from SLK is wrong (either text/html or text/xml would be my guess) rather than application/x-ms-xbap which I've configured IIS to associate with .xbap.

Does SLK attempt to return the MIME content type associated with the file extension of the content? Can I 'hint' this in the resource type attribute? (Don't get me started, I remember strongly arguing that <resource type=> should contain a MIME string rather than a "let's define our own!" string back in the day.)

- jcb
Oct 31, 2006 at 12:19 AM
Does this content show up properly in IE? I could launch an XBAP content through SLK on a Vista machine and it works well and does not render as XML. XBAP applications require .NET 3.0 or WPF to be installed and will render as XML on machines that don't have them.
Oct 31, 2006 at 12:20 AM
You can specify a MIME type to associate with a file name extension using the "SLK Settings" file. Just download the current SLK Settings file (go to SharePoint Central Administration, Application Management, Configure SharePoint Learning Kit), add a <MimeTypeMapping> entry, and upload the new SLK Settings (also on the Configure SharePoint Learning Kit page).

Keep in mind that these associations are on a per-site-collection basis -- if you have two site collections that use SLK, you need to do this twice. (You can also do this in a batch file using slkadm.exe, or programmatically using the SLK API.)
Coordinator
Oct 31, 2006 at 12:32 AM
Yes, if I launch the XBap from an IIS virtual directory on the same box it works -- I've run the XBap setup script on the server to add the appropriate mimetype mappings to the IIS metabase. It's only when launching from SLK that the content type isn't set.
Coordinator
Oct 31, 2006 at 12:38 AM
RE downloading the settings file, I get "The file '/_admin/SharePointLearningKit/DownloadSettings.aspx' does not exist." This is a franken-server that I've installed a custom build of CTP3a on, so this might be my fault.

I'm curious, why is a mapping in the IIS metabase not sufficient?