Make Apache (Linux) Support Silverlight

Source: Internet
Author: User
Test Environment

CentOS 5.2, Apache 2.2.3

Configure Apache

Open the Apache configuration file httpd. conf. For more information, see/etc/httpd/conf/httpd. conf.

Make sure that the mod_write and mod_mime modules have been loaded in the configuration file:

LoadModule rewrite_module modules/mod_rewrite.so

LoadModule mime_module modules/mod_mime.so

Then add the MIME information to the configuration file (the SL can be run without adding it ):

AddType application/xaml + xml. xaml
AddType application/x-silverlight-app. xap
AddType application/x-ms-xbap. xbap

Save httpd. conf, exit the editing mode, and restart the Apache service:

Service httpd restart

Load Silverlight

Because SL runs on the client, you do not need to make too many settings on the Server. Load the xap program to HTML below. Add the following code to create a new PHP program:

<object data="data:application/x-silverlight-2," type="application/x-silverlight-2"        width="100%" height="500px">    <param name="source" value="AutoCompleteBox.xap" />    <param name="onError" value="onSilverlightError" />    <param name="background" value="white" />    <param name="minRuntimeVersion" value="3.0.40624.0" />    <param name="autoUpgrade" value="true" />    <a href="http://go.microsoft.com/fwlink/?LinkID=149156&amp;v=3.0.40624.0"        style="text-decoration:none">            </a></object>
Related Materials

Silverlight Mime types in IIS6 and Apache

Run Silverlight with Apache Server (Under linux)

How to: Add Silverlight to a Web Page by Using HTML

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.