我收到一条错误消息:
The contract attribute is invalid. the value is invalid according to its datatype 'clientcontracttype'
以下是此 WCF 应用程序的 web.config 中的端点配置。我正在使用 .NET Framework 4.5 和 Visual Studio 2012。
我已验证契约(Contract) OnlineReporting.Core.Contracts.IReportingInternalWcfPortal
已存在。
<endpoint address="http://localhost:63817/ReportingInternalWcfPortal.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding"
contract="OnlineReporting.Core.Contracts.IReportingInternalWcfPortal"
name="ReportingInternalPortal" />
最佳答案
我发现这个问题已经很老了,我不知道你现在是否找到了解决方案,但为了以防万一,这就是我发现的可以解决的问题:
1) 在解决方案资源管理器中的“服务引用”文件夹下,右键单击存在问题的服务引用名称,然后选择“配置服务引用”。
2) 将出现“服务引用设置”窗口。取消选中标记为“在引用的程序集中重用类型”的框,然后单击“确定”按钮。
3) 重建项目。
重建后,警告应该消失。
关于wcf - 根据其数据类型,该值无效 'clientcontracttype',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15497378/