Posted By: Edoode
I’ve added a proxy to a webservice to a VS2008/.NET 3.5 solution. When constructing the client .NET throws this error:
Could not find default endpoint element that references contract ‘IMySOAPWebService’ in the ServiceModel client configuration section. This might be because no configuaration file was found for your application or because no endpoint element matching this contract could be found in the client element.
Searching for this error tells me to use the full namespace in the contract. Here’s my app.config with full namespace:
<client> <endpoint address="http://192.168.100.87:7001/soap/IMySOAPWebService" binding="basicHttpBinding" bindingConfiguration="IMySOAPWebServicebinding" contract="Fusion.DataExchange.Workflows.IMySOAPWebService" name="IMySOAPWebServicePort" /> </client>
I’m running XP local (I mention this because a number of Google hits mention win2k3)
The app.config is copied to app.exe.config, so that is also not the problem.
Having tested several options, I finally solved this by using
i.e. without the full namespace in the config. For some reason the full name didn’t resolve properly