I have few question regarding Silverlight Deployment:
Is it a prerequisite to add MIME type to deploy Silverlight Application?
if Yes, Why so, because the .XAP file can be handled by Static File Handler?
Is MIME type needed for Static File Handler ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is a IIS requirement.
As of IIS6 the default mime map of an IIS server does not contain a mapping of .* to “application/octet-stream”. The static file handler will to send the a resource to the client where the file extension does not have a mime mapping. This a part of an initiative to close down the attack surface of a web site.
Hence if you do not add the wildcard .* mapping or a specific mapping for .xap (which is preferable over .*) then a Xap file can not be delivered to the client.
Side Note
The Silverlight pulgin doesn’t really care about what Content-Type header is set to. In some cases where I have used a hosted service that neither supports .xap nor .* and even has the audacity to check that the contents of the file is what file extension says it is, I’ve renamed a xap to zip. Pointing the source of the silverlight plugin at a zip works fine.