1. There is indeed no service method;
2. No domainservice configuration exists in Web. config. (solution: add an empty domain service to the bearer application and delete it );
3. The service method is in a WCF Ria services class library. If the website is not referenced, or, if the DLL in the bin of the website is not updated, this error will be prompted (the automatic copy of VS is sometimes not very effective); (solution: synchronously update the corresponding DLL file to the bin directory)
4. The service method is not labeled with invoke;
5. There is a problem with the serialization of returned entities. The errors caused by this situation are very concealed and confusing,However, in this case, we can trace to the server.CodeThe client reports an error as soon as the service method call leaves.. In this case, it is basically because of entity serialization problems. So far, I have found that the following situations may cause serialization problems:
A) The entity reference has an instance-Level Cycle (this problem was mentioned in the previous blog). (solution: Check the reference relationship of the entity and remove the instance-level cycle, it is best to prevent such circular references from being referenced at the class level)
B) if there is shared code, if there is a difference between the client and the server shared code, especially in terms of attributes (generally, shared code cannot be automatically copied and directly copied to the client); (solution: the shared code of the server and the client is consistent)
C) The returned data contains too many objects. By default, an object with about 10 fields is configured. If there are more than 3000 records, an error will occur (here is an approximate number). (solution: the method is to configure the maximum number of serialized entities for this service and change it to the maximum value (on the web. in config). In addition, the number of objects returned to the client each time is not large, and the server-side method is recommended for paging ).
In the above five cases, 3-5 are relatively hidden, especially 5, and 1, 2, and 4 are relatively easy to check. Of course, the problem I encountered here is mainly for the use of domainservice. If you use linqtoentitiesservice, you can only refer to it. The situation may be different.
If you have more information, you can share with us that it is not easy to catch insects.