wcf,多客户呼叫服务问题 [英] wcf, multi client call service problem

查看:80
本文介绍了wcf,多客户呼叫服务问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

存在这样的问题.

在我的解决方案中,有一个主项目和许多UserControl项目.主项目使用这些UserControl项目在其UI的不同部分进行显示.

定义了WCF服务,当我在主项目中使用该服务时就可以了.但是当我在UserControl Project中使用服务时,它会抛出异常,例如找不到配置..".

有五个UserControl项目,我可以在其中使用WCF服务,但是这个问题阻碍了我的工作方式. WCF服务只能在主项目中正确调用.

如何在UserControl项目中调用WCF服务?我应该在不同的子项目中调用WCF服务(如果应该这样做)还是将WCF服务放在一起,并且所有项目都从一个来源调用它?如果将它们放在一起,该怎么办?

there is a problem a faced, situation like that.

in my solution there are one main project and many UserControl projects. main project use those UserControl projects for displaying on different part of its UI.

there are WCF services defined and when I use the service in main project it is ok. but when I use service in UserControl Project it throw exception like"can not find config.. ".

there are five UserControl projects , in which I may use WCF service, but that problem blocks my way to do it. WCF service only be correctly called in Main project.

how can I able to call WCF service in UserControl projects ? should I call WCF service in different sub projects (how if I should do that) or put WCF services together and all projects call it from one source? if I put them together, how can I do that?

thanks in advance!

推荐答案

您好,朋友尝试使用jquery或ajax调用服务方法,
试试这个,我认为它将解决您的问题...
Hello Friend try to call service method using jquery or ajax,
try this, i think it will solve your problem...


这篇关于wcf,多客户呼叫服务问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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