Summary of deployment issues of Silverlight application WCF Ria services in IIS6

Source: Internet
Author: User

Deploying WCF Ria services in IIS6 is simple, but some problems may also occur.

Our application is Silverlight 4 business application, which applies the WCF Ria service and. NET Framework 4 environment, so we encountered some problems.

The main environment involved is Windows Server 2003 R2/Enterprise Edition, which is deployed when Visual Studio 2010 is not installed.

After installing. NET Framework 4, Silverlight SDK 4, Silverlight tools, and other software packages, check the following if your WCF Ria application is not running properly:

 

1. Select 4.0.30319 for the Asp.net version.

Solution: In the IIS6 manager, select the attributes of the Web application. On the Asp.net tab, select 4.0.30319 as the Asp.net version. The default version is 2.0.50727.

Symptom: If the configuration is incorrect, the Web. config configuration item is incorrect.

 

2. xap mine type problems.

Symptom: If the configuration is incorrect, the error is that the Silverlight content does not appear, whether it is An ASPX test page or an HTML test page.

Cause: xap registers a MIME type in IIS6 and is registeredApplication/X-Silverlight-app orApplication/octet-stream can be downloaded

Operation: In the IIS6 manager, the machine node is the parent node of the website node. For example, if your host name is myserver, the node name is myserver (Local Computer) and the node property is clicked, select the mine type for registration.

 

3. Allow ASP. NET 4.0.30319

Symptom: The test page of aspx cannot be run. The error is not found, but the test page of HTML can run normally.

Cause: if you have just installed the. NET Framework 4.0 environment, IIS6 disables ASP. NET 4.0.30319 scripts by default.

Solution: In the IIS6 manager, select the Web service extension in the child node of the Host Name node (this node is the same as the "web site" and has application pools, web sites, web Service Extension), observe ASP. net 4.0.30319 items before the icon should have green white hook, status should be allowed. If not, right-click and select allow. The setting is complete.

 

4. SVC inaccessible

Symptom: Silverlight runs normally, but an exception occurs when calling the WCF Ria service. An error message is displayed. Such as logon or New User Creation.

Silverlight exception box similar to this

Load Operation failed for query 'getuser'. The remote server returns the error notfound.

Located in system. servicemodel. domainservices. Client. operationbase. Complete (Exception error)
Located in system. servicemodel. domainservices. Client. loadoperation. Complete (Exception error)
Located in system. servicemodel. domainservices. Client. domaincontext. completeload (iasyncresult asyncresult)
Located in system. servicemodel. domainservices. Client. domaincontext. <> C _ displayclass1b. <load> B _ 17 (object)

 

Cause: SVC service is not created

Solution: In the "authentication and Access Control" dialog box on the "Directory Security" tab in the Web application directory, select "enabled anonymous access" to enable Anonymous Access, and remove Integration authentication. That is to say, only anonymous access is allowed.

** After the configuration is complete, it is best to restart the entire IIS service so as not to waste time.

 

5. Other solutions

If IIS6 is installed after. NET Framework, you may need to register some extensions to the IIS extension. You can use the first command below to remedy this problem. After completion

Web site properties in IIS manager, under home directory/configuration, cocould you check if extension. SVC is mapped to aspnet_isapi.dll

Run "C: \ WINDOWS \ Microsoft. NET \ framework \ v4.0.30319 \ aspnet_regiis-I"

Run "C: \ WINDOWS \ Microsoft. NET \ framework \ v4.0.30319 \ servicemodelreg.exe-I"

 

Some people say that if we copy the following files to the bin directory, the test results can be left empty.

System. servicemodel. domainservices. entityframework

System. servicemodel. domainservices. Hosting

System. servicemodel. domainservices. Server

Copy local = true.

 

Some people say that it is probably because of the iis url rewriting mechanism. Upgrading to iis7 should solve your problem.

 

According to the above 1 ~ 5. The problem can be solved in IIS6, and you do not have to try to upgrade iis7, because problems still occur during iis7 deployment.

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.