【发布时间】:2023-03-03 06:59:25
【问题描述】:
我已经达到了几个小时了。我收到此错误消息:
“合同”属性无效 - 值“AddressService.IAddressVerificationService”根据其数据类型“clientContractType”无效 - 枚举约束失败。
配置文件如下所示:
<endpoint address="http://www.verifythisaddress.com/AddressVerification/AddressVerificationService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IAddressVerificationService"
contract="AddressService.IAddressVerificationService" name="BasicHttpBinding_IAddressVerificationService" />
我的服务开始看起来像:
namespace AddressVerificationWCF
{
// NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IService1" in both code and config file together.
[ServiceContract]
public interface IAddressVerificationService
{
[OperationContract]
Address VerifyThisAddress(string stuff);
}
}
我尝试了很多方法,例如更改名称、删除文件等,但我又摸不着头脑了。 谢谢。
【问题讨论】:
标签: wcf web-config