Reputation: 852
i am working on a wcf project
everything went well before an attempt to calling the service with a large object which exceeded the maxStringContentLength.
to fix that problem, i modify the config files in both client and server side to change that value from the default 8192 to 2M
then i get a FaultException exception that says "cannot create abstract class", during the call to my service, and before any of my service code is executed
the detail of the exception says it might be an exception created by setting IncludeExceptionDetailInFaults to true and its value is System.MemberAccessException
well, due to some locale reasons, this isn't the exact exception message, i have translated that to english to mean something similar
any suggestions on what might the problem be? thanks
Upvotes: 3
Views: 3092
Reputation: 852
This problem has been resolved. It's cause is that data contracts that are defined to be abstract classes at wcf server side will be transformed to concrete classes if you use visual studio to automatically generate the service reference at client side. Those concrete classes could be unintentionally instantiated, which causes the runtime exception
Upvotes: 2