0

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
Rich
  • 1

1 Answers1

-1

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
  • 117,338
  • 33
  • 229
  • 351
  • 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 Application Code: 2104 Category: InitializeError Message: Could not download the Silverlight application. check web server settings – Rich Nov 30 '09 at 21:49