Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WCF RIA Service deployment issue

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.

like image 441
Dragan Avatar asked Dec 08 '09 20:12

Dragan


2 Answers

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).

like image 78
Dragan Avatar answered Nov 11 '22 11:11

Dragan


If you inspect the error on that service request (which is normal the way you are seeing it), what does the contents in Fiddler say? NotFound is generit in the plugin, but fiddler is likely showing you an HTTP 500 or something with some more detail in the response body.

like image 1
Tim Heuer Avatar answered Nov 11 '22 10:11

Tim Heuer