Skip to main content
Kofax

KTA 7.x - Why am I getting a "Could not find default endpoint element that references contract" error?

3025317

Question / Problem: 

KTA 7.x - Why am I getting a "Could not find default endpoint element that references contract" error in my .NET Dll?  The error causes the job to suspend.

In the event log is the error:

Error Description : Could not find default endpoint element that references contract 'CaptureDocumentService.ICaptureDocumentService' 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. 

Answer / Solution: 

This error typically occurs when you use a webservice in a class library (DLL) and are calling this class library from another project. In this case you need to include the web service configuration from the class library's (DLL) app.config to the web.confg and exe.config of KTA.

So what is listed in your app.config sections:

<system.serviceModel>

<bindings>

and

<system.serviceModel>

<bindings>

<client>

or the web service connection must also be added to the configuration of KTA:

- web.config of the KTA web server

- Agility.Server.Core.WorkerService.exe.config, as the Core Worker is running .NET activities

 

Another possibility is to program the settings in your class library so you do not have to use a configuration file. See this link for an example: https://stackoverflow.com/questions/3703844/consume-a-soap-web-service-without-relying-on-the-app-config.

 

Applies to:  

Product Version
KTA 7.x

 

 

  • Was this article helpful?