1

I'm getting an error from a web part that calls a web service. I think I just need to add the endpoint XML to the web.config. Is there a better way to do this? Can I add the endpoint from Central Admin, or is there a way to set the web service address using a web part property?

Error - Could not find default endpoint element that references contract 'ABC.XYZ' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

  • 1
    Are you sure your web service works? – Kit Menke Nov 28 '12 at 20:02
  • Yes, I've tested the service with WCFTestClient – NoBot Nov 29 '12 at 0:26
0

I have never tried it, but I have run into posts claiming this may work: https://stackoverflow.com/questions/54579/wcf-configuration-without-a-config-file

0

The dynamic configuration of your service in SharePoint comes in the form of a custom service factory. When you develop your service, you must specify the service factory provided by SharePoint, and after you specify it, you no longer need configuration entries in web.config. See this post for more details.

  • The service I am using is not hosted on the SharePoint server. So if I understand the post correctly, I don't think it's applicable for my current need. Thank you! – NoBot Nov 29 '12 at 0:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.