views:

209

answers:

1

I have a script that creates an app pool, web site - and then I want to use adsutil to add the .xap MimeType.

I see this:

cscript adsutil.vbs set W3SVC//Root/MimeMap “.extension,mimetype”

However, since I am creating the web site in the same script I will not know the ID.

Would anyone know how to do this with adsutil?

Thanks,

  • Rich
A: 

You could always add the MimeType using web.config instead:

<configuration>
 <system.webServer>
  <staticContent>
   <mimeMap fileExtension=".xaml" mimeType="application/xaml+xml" />
   <mimeMap fileExtension=".xap" mimeType="application/x-silverlight-app" />
   <mimeMap fileExtension=".xbap" mimeType="application/x-ms-xbap" />
  </staticContent>
 </system.webServer>
</configuration>
spender
Hi - thanks for the rapid response!I did try adding those lines to my web.config file. However, when I tried redirecting to the site I received the same error:Error: Unhandled Error in Silverlight 2 ApplicationCode: 2104Category: InitializeErrorMessage: Could not download the Silverlight application. check web server settings
Rich