首页 新闻 赞助 找找看

吐血求教客户端引用WCF服务,ActionNotSupportedException异常。

0
悬赏园豆:100 [已解决问题] 解决于 2015-04-14 17:03

异常详情

The message with Action 'http://tempuri.org/IPDAUpShelfService/GetEnumData' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None)

在写几乎是变了百度搜到的所有方法。

服务端和客户端的方法完全一致。

在下是接手的别人的项目,在原先的项目上建的分支。服务原先的都好使,所有我新加的方法就不行。

一开始我在A服务里加方法,测试通过,客户端调用报这异常,有改写到B服务里,还是一样。

方法肯定是没问题, int get(int a,int b){return a*b;} 也是报这异常。

不知道是不是web.config的问题,在服务端的web.config里没找到用到的那个服务的binding和service节点。

憋了一天了,求高手指点。

雄风哥的主页 雄风哥 | 初学一级 | 园豆:55
提问于:2013-06-21 20:36
< >
分享
最佳答案
0

检查一下 contract 和 binding ,服务端和客户端必须一致.web.config 没有配置的话,估计是用代码的形式做的

收获园豆:100
Yu | 专家六级 |园豆:12980 | 2013-06-21 20:53

都检查过了,一样的。。

雄风哥 | 园豆:55 (初学一级) | 2013-07-10 12:33
其他回答(2)
0
Zachary_Fan | 园豆:762 (小虾三级) | 2013-06-21 22:48
0

最后重新加载了一下项目解决了,原先那个是做了一个分支。

雄风哥 | 园豆:55 (初学一级) | 2013-12-31 17:14
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册