WCF 捕获异常服务器没有提供有意义的回复……" [英] WCF catches exception " The server did not provide a meaningful reply.."

查看:36
本文介绍了WCF 捕获异常服务器没有提供有意义的回复……"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在服务器调用后,我的客户端捕获到带有以下消息的异常

<块引用><块引用>

服务器没有提供有意义的回复;这可能是由于合同不匹配、会话过早关闭或内部服务器错误造成的."

另外,请注意我尝试了 WCF 中的配置服务器没有提供有意义的回复但还是不行.

请注意,我将服务调试到最后,数据已成功填充,但在客户端,当数据应该出现时,它只是因上述异常而崩溃.

感谢任何帮助.

解决方案

我想出了这背后的原因,为枚举类型错误地生成了代理,它是作为字符串生成的,所以它失败了,并给了我那个异常

after a server call my client catches an exception with the following message

"The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error."

Also, note I tried the configuration in WCF "The server did not provide a meaningful reply" but still didn't work.

Please note, that I debug the service to the end, and the data is successfully populated but at the client end when the data is supposed to appear it just crashes with the mentioned exception.

Any help appreciated.

解决方案

I figured out the reason behind this that the proxy was wrongly generated for an enum type, it was generated as a string so it failed and gave me out that exception

这篇关于WCF 捕获异常服务器没有提供有意义的回复……"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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