WCF服务参考更新存在问题 [英] Problem with WCF service reference updation

查看:84
本文介绍了WCF服务参考更新存在问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我陷入了一个非常奇怪的问题.我正在使用VS2010在asp.net项目中使用wcf服务.以前一切都很好,但是突然wcf服务更新就开始表现得异常厉害.只要我通过右键单击服务并选择更新服务引用"来更新服务引用,它就会从web.config中删除所有端点并清除Referece.cs文件.但是它不会重写两个文件中的任何内容.这意味着其更新不正确.甚至删除和添加服务参考资料也可以.

但是,当我将其添加到任何其他项目中时,相同的引用也可以正常工作.期待解决该问题的任何指导.

在此先感谢

Hi All,

I am stuck in a very strange problem. I am consuming a wcf service in asp.net project using VS2010. Everything was fine before, but suddenly wcf service updation started behaving strangly. As soon as i update the service reference by right clicking on the service and selecting Update Service Reference, it deletes all the end points from web.config and clears the Referece.cs file. But it doesn''t rewrite anything in both files. That means its not updating properly. Even delete and add of service reference dint work.

But the same reference works fine when i add it into any other project. Looking forward any guidance to solve this problem.

Thanks in advance

推荐答案

我的WCF服务曾经遇到过同样的问题.当我使用未知类型在服务和客户端之间进行传输时,会发生问题.

尝试使用Microsoft测试客户端连接到您的服务,也许此工具会为您提供有关哪种方法错误的线索.详细信息:请参阅 http://msdn.microsoft.com/en-us/library/bb552364.aspx [^ ]

否则,您也可以一一评论所有的运营合同,并尝试每次更新您的服务参考.这样您就可以发现哪个是不正确的OperationContract
I had the same problem once with my WCF Service. The problem occurs when I used unknown types to transfer between the service and the client.

try the microsoft test client to connect to your service and maybe this tool will give you some clue to which method is wrong. more info: see http://msdn.microsoft.com/en-us/library/bb552364.aspx[^]

Otherwise you can also comment all the Operationcontracts one by one and try to update your service reference each time. So you can discover which is the incorrect OperationContract


您好...最后,我找到了此问题的原因...这是由于WCF服务项目中引用的一些常见程序集和消费项目.我从消耗项目的程序中删除了这些程序集,一切都开始正常工作... :)
感谢Wannes的帮助....
Hi... Finally i have found the reason behind this issue...it''s because of some common assemblies referred in WCF service project and Consuming project. I removed those assemblies from consuming project and everything started working fine... :)
Thanks Wannes for your help ....


这篇关于WCF服务参考更新存在问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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