且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

WCF 捕获异常服务器没有提供有意义的回复……"

更新时间:2023-11-22 09:47:22

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

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