The problem of deploying WCF Ria services has been solved after two days.

Source: Internet
Author: User

 

I am using ADO. NET Entity Data Model to generate *. edmx, and then use domain service to generate the service. Call methods in the service in Silverlight. The above process is normal in vs2010. When I want to deploy the program in IIS6, the program can run, but I cannot obtain the SQL server data. The system always prompts "the remote server returns an error: notfound .";

1: the cross-XML file has been added to the following directory;

2: The DLL used by the system has been stored in the bin directory of Beibei paper;

3: Access http: // localhost: 8000/WCF/services/sl_WcfRia-web-hwDomainContext.svc with dynamic SVC address cannot get service page, can be accessed when vs2010 runtime environment scope;

Dear friends, do you know why the setup on the server is faulty and the SVC service cannot be accessed on IIS. Thank you for your help!

Running environment:

1: The development environment and server are one machine (System: Windows XP; Database: 2005 SQL Server; IIS: 5.1)

2: The Web. config file is as follows:

<? XML version = "1.0" encoding = "UTF-8"?>
<! --
For more information on how to configure your ASP. NET application, please visit
Http://go.microsoft.com/fwlink? Linkid = 169433
-->
<Configuration>
<Customerrors mode = "on"/>
<System. webserver>
<Modules runallmanagedmodulesforallrequests = "true">
<Add name = "domainservicemodule" precondition = "managedhandler" type = "system. servicemodel. domainservices. hosting. domainservicehttpmodule, system. servicemodel. domainservices. hosting, version = 4.0.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "/>
</Modules>
<Validation validateintegratedmodeconfiguration = "false"/>
</System. webserver>
<System. Web>
<Httpmodules>
<Add name = "domainservicemodule" type = "system. servicemodel. domainservices. hosting. domainservicehttpmodule, system. servicemodel. domainservices. hosting, version = 4.0.0.0, culture = neutral, publickeytoken = 31bf3856ad364e35 "/>
</Httpmodules>
<Compilation DEBUG = "true" targetframework = "4.0"/>
</System. Web>
<System. servicemodel>
<Servicehostingenvironment aspnetcompatibilityenabled = "true"
Multiplesitebindingsenabled = "true"/>
<Bindings>
<Basichttpbinding>
<Binding name = "foosoap" maxbuffersize = "2147483647" maxcompute edmessagesize = "2147483647">
<Security mode = "transport"/>
</Binding>
</Basichttpbinding>
</Bindings>
<Behaviors>
<Servicebehaviors>
<Behavior>
<Datacontractserializer maxitemsinobjectgraph = "2147483647"/>
</Behavior>
</Servicebehaviors>
</Behaviors>
</System. servicemodel>
</Configuration>

The problem is described above: Write the solution below: 1. As for how to create the wcfria service, it will not be cumbersome for the moment. If you do not know it, there will be a document in my resource file called"Use the Silverlight Ria services class library to "download and read by yourself". 2. After creating the wcfria service and debugging the program, publish it to IIS as follows: 1. Install IIS.
2: Install frmwork4.0 (Steps 2, 3, and 4 should be installed during development)
3: Install silverlight_4_toolkit_april_2010.msi
4: create a virtual directory for the website
5: Copy System. servicemodel. domainservices. Hosting and system. servicemodel. domainservices. server from the development machine to the C: \ WINDOWS \ microsoft. net \ Assembly \ gac_msil directory of the production machine
6: copy the clientaccesspolicy. xml file to the wwwroot directory.
7: copy the backup data from the development machine to the backup system. servicemodel. domainservices. hosting. odata and system. servicemodel. domainservices. entityframework to production machine c: \ windows \ Microsoft. net \ Assembly \ gac_msil directory
8: Configure IIS
(1): WEV service extension-> allow ASP. netv4.0
(2): website properties-> document-> Add default documents (for example, investoday. Yankee. thirdpartytestpage. aspx)
(3): website properties-> Directory Security-> set authentication to only enable Anonymous Authentication, remove the integration of Windows authentication.
(4): Choose website Properties> Asp.net> Version 4.0.
(5): website properties-> HTTP header-> click MIME type-> Add. XAML: Application/XAML + XML and. xap: Application/X-Silverlight-app ing
(6) Restart IIS-> run the command: iisreset

After completing the preceding steps, the deployment can be successful (for Windows 2003 sp2 and Windows XP)

Solving problems is happy, and sharing experiences is happy.

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.