简体   繁体   English

没有为CLI C ++调用W#Web服务的C#dll配置Endpoint

[英]No EndPoint configured for CLI C++ calling C# dll calling WCF Web Service

I am building a CLI/C++ dll that will be used as a plugin to an EXE file. 我正在构建一个CLI / C ++ dll,它将用作EXE文件的插件。 The CLI/C++ project has a reference to a C# dll. CLI / C ++项目具有对C#dll的引用。 Further, the C# dll has a Service Reference to a WCF Web Service. 此外,C#dll具有对WCF Web服务的服务引用。

I used to get a runtime exception saying "FileNotFound". 我曾经得到一个运行时异常,说“ FileNotFound”。 I discovered that the C# dll has to be in the same folder as the EXE in order for it to be found. 我发现C#dll必须与EXE位于同一文件夹中才能找到它。 However, now I get an exception that there is no EndPoint configured for the ServiceRefernce. 但是,现在我得到一个例外,即没有为ServiceRefernce配置端点。

Has anyone worked with a similar case? 有人处理过类似案件吗? Do I need to copy the Service Reference config files to the same folder as the EXE as well? 我是否还需要将服务参考配置文件也复制到EXE所在的文件夹中?

The service reference configuration needs to be copied to the configuration file of the executable. 服务参考配置需要复制到可执行文件的配置文件中。 An application config file for another assembly cannot be (easily) loaded into an executing assembly. 无法(轻松)将另一个程序集的应用程序配置文件加载到正在执行的程序集中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM