简体   繁体   English

从WCF代理获取空值

[英]Getting null values from wcf proxy

I've a C# client which gets data from database from a method in the business layer, using a WCF proxy[basicHttpBinding]. 我有一个C#客户端,它使用WCF代理[basicHttpBinding]从业务层中的方法从数据库中获取数据。 On debugging I find that the data from database comes correctly till the WCF Service layer, but it becomes null at the client level. 在调试时,我发现来自数据库的数据正确到达WCF服务层,但在客户端级别变为空。 What could I be missing over here? 我在这里可能会错过什么?

Thanks. 谢谢。

I am assuming that this service use to work and then it stopped working. 我假设此服务用于工作,然后停止工作。 Before you try anything else, please update your service reference. 在尝试任何其他操作之前,请更新您的服务参考。 Usually, values show up as null if there is an incompatibility between the WSDL for the WCF service and the proxy client for that service. 通常,如果WCF服务的WSDL与该服务的代理客户端之间不兼容,则值将显示为null。 This usually happens when the service changes and the proxy client or service reference is not updated. 当服务更改并且代理客户端或服务引用未更新时,通常会发生这种情况。

In case it never worked then we need a code sample and your config file. 万一它永远无法工作,那么我们需要一个代码示例和您的配置文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM