WCF RIA Service deployment issue

Dragan picture Dragan · Dec 8, 2009 · Viewed 16.1k times · Source

I have a very simple sample silverlight application. I added a domain service to it with an entity model that has one entity. The client app simply loads all rows in the entity at startup. When I run this on my development box, it works as expected. However, when I move it to our test server I get an exception saying that the method I am calling cannot be found (Load operation failed for query 'GetCTCStation'. The remote server returned an error. NotFound.). When I inspected the client/server communication more closely with Fiddler I found out that the request is going to http://[server url]/ClientBin/SilverlightApplication7-Client-Web-CTCService.svc/binary. I added the domain service to the root of the web project, so I don't understand why the client is looking for it in the ClientBin directory. It's obviously not there. What am I doing wrong here? I have never had any issues with July preview version of RIA.


It is relative, but that is handled in the Generated_Code file automatically. And there is nothing in the webconfig to configure. I used default settings when creating a domain service. I tried explicitly setting the uri when instantiating the service and same exception occurred.

Answer

Dragan picture Dragan · Dec 9, 2009

After a long struggle and trying out many different options I finally found the solution. This post was the key:

Basically, some dll's were not inluded in the bin folder when publishing the project. Make sure under References that the following dll's are setup correctly (Make sure that System.ComponentModel.DataAnnotations is pointing to C:\Program Files\Microsoft SDKs\RIA Services\v1.0\Libraries\Server\System.ComponentModel.DataAnnotations.dll):

System.ComponentModel.DataAnnotations and every dll that starts with System.Web needs to have "Copy Local" set to true.

Build the project and publish again. This fixed the problem for me.

I would like to thank everyone that contributed to the solution of this issue (in this thread and others).