.Net Dll with Web Service in VB6


I pose the following scenario.

  • I have a DLL ( developed in .Net with fwrk 4 ) where one of its functions is to connect to a WebService (Service reference).
  • I have some projects developed in .Net that consume this DLL.

  • I have some projects developed in Vb6 that need to consume that DLL.

The projects developed in .Net work without problems using the reference of the Dll. But I have problems using it in vb6 projects.

The DLL can already be referenced in VB6 and I can invoke the existing methods, but I get the following error when trying to execute the webservice methods.

This error I had at the beginning when I added and tested the dll with the .Net projects and the solution was adding the serviceModel block (binding and endpoint) of the app.config generated by the project of the DLL in the app.config of the project where you used the DLL. and it worked.

My question is how do I resolve it in VB6?

Thank you very much. Waiting for your comments

asked by Gabriel Intriago 16.12.2017 в 05:11

1 answer


They already helped me with the topic.

What you have to do is copy the generated app.config from the DLL project and paste it into the VB6 folder then rename it to VB6.exe.config

Keep in mind that when the project is compiled you have to rename the configuration file to projectname.exe.config and be next to projectname.exe for its operation.

While it is being used with the IDE of vb6 the file must be next to VB6.exe and be called VB6.exe.config

Source here

answered by 18.12.2017 / 15:21