次の方法で共有


Tip : Add XAP Mime-Type in Tomcat and IIS 5.1

Mime-Type are used to provide identifiers for file formats on the Internet.

By default, XAP files are not recognized as a Silverlight application in Tomcat or IIS 5.1. You can set a Mime-Type to identify XAP files on both servers.

Setting Mime-Type in Tomcat

in %TOMCAT_INSTALL%/conf directory, edit web.xml file. Add the following description to identify XAP files

 <mime-mapping>
     <extension>xap</extension>
     <mime-type>application/x-silverlight-2-b2</mime-type>
 </mime-mapping>
  • Restart Tomcat and clear your navigator cache,
  • get a XAP file to ensure that the Mime-Type is correctly set

image

Setting Mime-Type in IIS 5.1

  • Open the IIS Management Console
  • Open your Web Site properties, under HTTP Headers click on File Types button

image

 

  • In the File Types window, click New Type to add a new Mime-Type

image image

  • Get a XAP file within IIS to ensure that the Mime-Type is correctly set

image

- Ronny Kwon

Comments