2

I am trying to deploy a Silverlight app to iis on a Win 2003 server. I add the mime type for silverlight to iis ( .xap, application/x-silverlight-app ) and then restart the app pool, and the app downoads and runs.

However, running an iisreset or restaring the machine blows away the mime entry. Why does this happen?

4
  • Did you do this via IIS MMC?
    – Kev
    Jan 27, 2012 at 18:34
  • yes, right click on machine name under iis > properties > mime types Jan 27, 2012 at 18:49
  • Does it physically get removed from the list or just stops working?
    – Kev
    Jan 27, 2012 at 18:59
  • both (these are extra characters because of the min requred to comment) Jan 27, 2012 at 19:14

2 Answers 2

0

You shouldn't be using IISReset.

IISReset has a /NOFORCE parameter that waits for the service to shut down cleanly before restarting it.

That might get you around the loss of settings when the service fails to write out the metabase.xml file in time (perhaps due to antivirus interference; it's often something that doesn't reproduce elsewhere when this happens).

But rule-of-thumb, don't use it.

I can't think of any situations other than complete failure of all hosted websites simultaneously in which IISReset might actually be required.

Most of the time, you can get what you need to do done with a Recycle of the relevant Application Pool. Note: It doesn't actually start a new process until the next request comes in, unless requests are queued already.

0

Add the mime type value to the server configuration file in:

\Windows\System32\inetsrv\config\applicationHost.config

In your case:

<staticContent>
     ...
     <mimeMap fileExtension=".xap" mimeType="application/x-silverlight-app" />
     ...
</staticContent>

That will not get removed during an iisreset.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .