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?
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.
Add the mime type value to the server configuration file in:
In your case:
That will not get removed during an iisreset.