根据其数据类型"clientcontracttype",该值无效 [英] The value is invalid according to its datatype 'clientcontracttype'

查看:601
本文介绍了根据其数据类型"clientcontracttype",该值无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到一条错误消息:

合同属性无效.该值根据是无效的 其数据类型为"clientcontracttype"

The contract attribute is invalid. the value is invalid according to its datatype 'clientcontracttype'

以下是此WCF应用程序的web.config中的端点配置.我正在使用.NET Framework 4.5和Visual Studio 2012. 我已经确认合同OnlineReporting.Core.Contracts.IReportingInternalWcfPortal已经存在.

Following is the endpoint configuration in web.config of this WCF application. I am using .NET Framework 4.5 and Visual Studio 2012. I have verified the contract OnlineReporting.Core.Contracts.IReportingInternalWcfPortal is already there.

<endpoint address="http://localhost:63817/ReportingInternalWcfPortal.svc" 
          binding="basicHttpBinding" 
          bindingConfiguration="BasicHttpBinding" 
          contract="OnlineReporting.Core.Contracts.IReportingInternalWcfPortal" 
          name="ReportingInternalPortal" />

推荐答案

我看到这个问题已经很老了,我不知道您现在是否找到了解决方案,但以防万一,这就是我发现的问题将解决:

I see this question is pretty old and I don't know if you have found a solution by now, but just in case, this is what I have found will resolve:

1)在解决方案资源管理器的服务引用"文件夹下,右键单击出现问题的服务引用名称,然后选择配置服务引用".

1) In the Solution Explorer, under the Service References folder, right-click the service reference name with the issue and select 'Configure Service Reference'.

2)将出现服务参考设置"窗口.取消选中标有在引用的程序集中重复使用类型"的框,然后单击确定"按钮.

2) The Service Reference Settings window will appear. Uncheck the box labeled 'Reuse types in referenced assemblies' and click the OK button.

3)重建项目.

重建后,警告应该消失.

After rebuilding, the warning should disappear.

这篇关于根据其数据类型"clientcontracttype",该值无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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