当前位置:编程学习 > C#/ASP.NET >>

WCF 多个客户端DLL文件如何调用配置文件

系统采用WCF架构,客户端的入口为EXE文件,根据需要调用不同的窗体,每个窗体封装为dll文件,如何在这些dll文件中使用wcf的配置文件啊,每次在窗体中实例化是都会报如下错误:
Could not find default endpoint element that references contract 'ServiceReference1.IProductInfo' 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. --------------------编程问答-------------------- 要把配置项配置在 客户端的入口程序.exe.config里面。 --------------------编程问答-------------------- 放在客户端的入口程序.exe.config里面是可以实现,dll文件需要把入口的exe作为引用才可以使用,我现在就是想单独的做一个dll,所有的模块都引用这个dll来实现配置文件的调用。
补充:.NET技术 ,  .NET Framework
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,