Full Process of Silverlight IIS release

Source: Internet
Author: User

 

(1) install and configure IIS

In fact, IIS version 7.0 has been released. I thought it was necessary to install the latest version.

As stated on the internet, XP corresponds to IIS 5.1, Windows2003 corresponds to IIS 6.0, Windows Vista, Windows 7, and Windows 2008

Corresponding to 7.0, XP can also install iis6.0, but to do some system modifications, there are online tutorials. I will not talk about it here. I finally used IIS 5.1.

Control Panel -- add or deleteProgram-- Add/delete Windows Components -- check Internet Information Service (IIS), click Next, place it on the Windows installation disk, and enter i386. The admxprox. dll cannot be found. In fact, some suffixes are a bit different. Select admxprox. DL _ twice and wait until the installation is complete.

After the installation is successful, open IIS on the control panel-Administrative Tools-Internet Information Service. You can publish a website or use the website that comes with it by default.

If any problem occurs, the solution is as follows::

I,IIS 500 Error(This does not know whether the system settings have been modified. It is impossible to uninstall IIS and reinstall IIS several times ). Baidu search IIS 500 error, one step to help you deal with, (such as this page: http://www.kuqin.com/web/20081016/22930.html)

The following is a strong DOS batch processing, which can be downloaded and run.

Http://down1.kuqin.com/code/iis500.rar

Note: I cannot solve the problem by manually entering the command cmd. I wonder if I have entered the command.

Another solution is simple enough. (I used this and found that the 500 error was missing and changed to 403. I can solve it .)

1. Run: regsvr32 % WINDIR %/system32/VBScript. dll (in fact, this step can also be saved. Make sure to execute it if necessary)
2. Run: MSDTC-resetlog
3. reinstall IIS

PS: summarize it by yourself to avoid detours.

Ii. About to uninstall IIS:

We recommend that you use the following steps to reinstall IIS under any circumstances:

1. Uninstall IIS.
2. Delete c: \ windows \ system32 \ inetsrv. (In security mode .)
3. Delete c: \ windows \ iisx. log. X is the IIS version. (In security mode .)
4. Delete the c: \ Inetpub \ directory. (In security mode .)
5. reinstall IIS.

3. After IIS is installed, something is configured(If you install it for the first time)

Error message: failed to access the IIS metadatabase

Solution:

1. Click Start> Run ".

2. Enter "C: \ WINDOWS \ Microsoft. NET \ framework \ v2.0.50727 \ aspnet_regiis.exe-I" in the "run" column, and click "enter.

3. The displayed cmd window displays "start to install ASP. net xxx" and other content. Wait until the window is closed automatically.

(2) Silverlight Project released on IIS

As a relatively new technology, Silverlight does not support those new Suffixes in earlier versions of IIS and does not know how to parse. xap.

In this case, you need to make some modifications to IIS: ("website" -- Right-click -- "attribute" -- "HTTP header" -- "file type" -- "New Type" to add the corresponding types, in this way, IIS supports Silverlight. Only)

Extension:. xap
Mime Type: xapapplication/X-Silverlight

Extension:. XAML
Mime Type: Application/XAML + XML
(3) minor issues with project release (cainiao Tips)

When you publish a project, the project folder is generally created, for example, Web.

I am used to vs2008 and usually select a fixed port during running. (In this case, the release of VS is very simple)

If your project uses files such as upload and download (ashx is used), there will be http: // localhost: 2000/handle. ashx and other such addresses. Modify http: // localhost/web/handle. ashx. Corresponding to the relative path.

IIS uses port 80 by default, so no need to write the port.

(4) Silverlight access problems

Silverlight cross-Origin:

Silverlight has made a lot of considerations for network security during the design. For details, refer to the Silverlight SDK. Cross-origin communication is a Web service that uses the correct cross-origin policy file in the root deployment of other domains. You can enable the Web service to be called by Silverlight-based applications in this domain. Silverlight supports two types of cross-origin policy files.

· Silverlight cross-Origin Policy (clientaccesspolicy. XML)

· Subset of Flash Cross-Domain Policy (crossdomain. XML)

Generally, if a Silverlight-based application detects that its request is a cross-origin request, it first searches for the Silverlight cross-origin policy file (clientaccesspolicy. XML) at the application root of the web service ). If this request causes "404 Not Found" or other errors, the application searches for the flash Cross-Domain Policy file (crossdomain. XML) at the application root ). Cross-origin policy files cannot be redirected. In addition, the cross-origin policy file is valid for the Application Session.
Now you know that you only need to deploy a cross-origin policy file on your website to solve the problem of Silverlight cross-origin requests.

The tutorial I bought is configured in this way. It seems that the two files configured for WCF are stored in the root directory of the website.

Contents of the clientaccesspolicy. xml configuration file:

<? XML version = "1.0" encoding = "UTF-8"?>

<Access-Policy>

<Cross-domain-access>

<Policy>

<Allow-from>

<Domain uri = "*"/>

</Allow-from>

<Grant-to>

<Resource Path = "/" include-subpaths = "true"/>

</Grant-to>

</Policy>

</Cross-Domain-access>

</Access-Policy>

Crossdomain. xml configuration file content:

<? XML version = "1.0"?>

<Cross-domain-Policy>

<Allow-access-from domain = "*"/>

</Cross-Domain-Policy>

PS: edit the summary by yourself to avoid detours. The solution comes from the Internet and tutorials.

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.