Webservice call from .net class called from VB6

I am using VB6 in a project and I have a .Net dll for handling document transfers. In one of these libraries, I call a web service to retrieve my documents. This code works if it only works as a .net project, but works from vb6, it causes the following error:

"Could not find an endpoint element named" DocServiceSoap "and the contract" documentWebService.DocServiceSoap "in the ServiceModel client configuration section. This may be because some configuration file was not found for your application, or because neither one endpoint element matching this name cannot be found in the client element "

I searched googled and tried everything for example. copying from app.config to web.config, specifying the name of the endpoint when calling the service, still no luck: /

Any ideas?

+4
source share
1 answer

I assume your app.config is called myDotNetDll.dll.config ? It is not right. The configuration file must always be attached to the executable file.

So, to solve your problem, you need to copy it to the VB6 application, that is, it should be called myVb6Application.exe.config and located in the same directory as your myVb6Application.exe .

+4
source

All Articles