Click here to Skip to main content
15,905,875 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi everyone, I'm working on a project and I need a WCF Service that contains several Entity Framework Code First classes, the have One-to-Many Relations between them, and I have some methods like add to the database or get data from the database, when I'm execute this service and try to use any of this methods on the WCF Client, instead the expected result, I'm getting this message:
"Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service."
If anyone have any idea why is this happening, please, I request some help. Thanks and Best Regards.
Posted

In WCF, an endpoint must supply the ABC - Address, Binding, Contract.

Make sure that you have all these in your config file.
As far I know, this kind of error occurs in case of any one of these property is missing or incorrect.

If everything is fine with your web.config, please share the service section from web.config file.

Reference:
ABCs of an EndPoint in WCF[^]
Why WCF cannot be invoked in wcftestclient?[^]

Hope, it helps :)
 
Share this answer
 
well, thanks Suvendu, the problem was I did generate a file named "DataContext", and put all the entities and Context in that file, but when I'm trying to add or list, the config file didn't have the correct configuration to get the data from a database file, more specifically, didn't havethe connection string line configured in my App.config file, thanks for the advised, it was very helpful...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900