从 .Net 到 vb6 的带有 WebServices 的 Dll - 如何设置 app.config [英] Dll with WebServices from .Net to vb6 - how to setup app.config

查看:26
本文介绍了从 .Net 到 vb6 的带有 WebServices 的 Dll - 如何设置 app.config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个适用于 webServices 的 DLL.

I have a DLL that works with a webServices.

我使用 .NET 开发了一些使用此 DLL 的项目,并且可以正常工作.

I developed some projects with .NET that consume this DLL and work without problems.

我也有一些用 VB6 开发的项目,我需要使用这个 DLL,但是当我调用运行 webservice 的方法时,它显示了以下消息.

I also have some projects developed in VB6 and I need to consume this DLL, but when I call the method where the webservice is running, it shows me the following message.

在服务模型客户端配置部分中找不到引用合同MYDLLNAME"的默认端点元素.这可能是因为找不到您的应用程序的配置文件,或者因为在客户端元素中找不到与此合同匹配的端点元素

Could not find default endpoint element that references contract 'MYDLLNAME' in the service model client configuaration section. This might be because no configuaration file was found for your application or because no end point element matching this contract could be found in the client element

我一开始在.NET的项目中解决了这个问题,在项目main的app.config中添加了DLL项目的app.config的一部分,运行正常.

I solved this problem at the beginning with the projects of .NET, I added a part of the app.config of the project of the DLL in the app.config of the project main and it worked correctly.

我的问题是,我如何在 VB6 中解决它?

My question is, how do I resolve it in VB6?

推荐答案

想象一下:

  • 使用 .NET 编写的名为 project1.dll 的 DLL,需要 app.config
  • 用 .NET 编写的名为 project2.exe 的 EXE
  • 一个用 VB6 编写的名为 project3.exe 的 EXE.

您需要将project1 app.config 的一部分复制到project3.exe.config.

You need to copy a part of the project1 app.config to project3.exe.config.

你之前所做的是将相关部分复制到project2 app.config,编译后重命名为project2.exe.config.

What you did before was to copy the relevant section to project2 app.config, that when compiled is renamed to project2.exe.config.

请注意,当您使用 VB6 IDE 时,需要 app.config 的进程是 VB6.exe,所以我也会将该 app.config 复制到 VB6 文件夹并将其重命名为 VB6.exe.配置.看到这个答案

Please note, that while you are using the VB6 IDE, the process that requires an app.config is the VB6.exe, so I would also copy that app.config to the VB6 folder and renamed it as VB6.exe.config. See this answer

这篇关于从 .Net 到 vb6 的带有 WebServices 的 Dll - 如何设置 app.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆