When I got home from work in the evening, I got off the silverlight4 official version and started to experience it. The first thing I tried was riaservice. I created an RIA service class library project and implemented a simple query method, and bind the query result to the ListBox. After the result is run, the JS prompts an error. It means that the called method is not found. I remember that I encountered this problem before beta, as if it was caused by no configuration in the configuration file, however, I couldn't figure out how the original configuration came from, so I had to use the most cumbersome method: I created a Silverlight project and directly added a domainservices class to my website, then copy the automatically generated web. config. After trying, the problem is solved. Here, the configuration file is recorded for future use. Web. config
<Configuration>
<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"/>
</System. servicemodel>
</Configuration>