wcf的svcutil.exe工具生成代码的奇怪问题
2015-05-18 14:28
591 查看
原本是用wcf的svcutil.exe生成客户端的代码,然后在本地调试、单元测试、功能集成都一切ok,但是一旦放倒win2008的服务器上就发生了很奇怪的问题,爆出如下的异常:
Type 'System.Threading.Tasks.Task`1[BitAuto.MaiChe.ESB.UserService.ActionResultsOfUserAccessTokenEntityr_PAdGrmY]' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with
the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.
但是对应的类命名是有相应的属性标签的。
后来基于工程管理的考虑,把对应的类的名字改了,然后把引用方式改成了直接服务引用,奇怪的事情发生了,上面的错误没有了。
然后把引用生成的客户端代码和svcutil.exe生成客户端的代码放在一起对比了一下,代码是不一样的,问题在此?svcutil.exe生成代码会在win2008上有问题?
最近时间比较近,暂时mark,留待忙完这段时间详细研究
有碰到过相同问题的同学请赐教啊
Type 'System.Threading.Tasks.Task`1[BitAuto.MaiChe.ESB.UserService.ActionResultsOfUserAccessTokenEntityr_PAdGrmY]' cannot be serialized. Consider marking it with the DataContractAttribute attribute, and marking all of its members you want serialized with
the DataMemberAttribute attribute. If the type is a collection, consider marking it with the CollectionDataContractAttribute. See the Microsoft .NET Framework documentation for other supported types.
但是对应的类命名是有相应的属性标签的。
后来基于工程管理的考虑,把对应的类的名字改了,然后把引用方式改成了直接服务引用,奇怪的事情发生了,上面的错误没有了。
然后把引用生成的客户端代码和svcutil.exe生成客户端的代码放在一起对比了一下,代码是不一样的,问题在此?svcutil.exe生成代码会在win2008上有问题?
最近时间比较近,暂时mark,留待忙完这段时间详细研究
有碰到过相同问题的同学请赐教啊
相关文章推荐
- WCF 系列:通过SvcUtil.exe生成客户端代码和配置
- WCF 使用svcutil.exe生成代理代码
- WCF基础_使用svcutil.exe 工具来生成调用文件
- WCF 服务IIS部署 SvcUtil.exe 工具文件地址 及 生成代理类命令
- WCF 服务IIS部署 SvcUtil.exe 工具文件地址 及 生成代理类命令
- 使用svcutil工具自动生成wcf调用的客户端代码和配置文件
- WCF 服务IIS部署 SvcUtil.exe 工具文件地址 及 生成代理类命令
- 利用svcutil.exe 访问windows Server 2003的wcf服务生成客户端代码报错:无法从http://XXX/XXX.svc?wsdl获取元数据”错误的解决方法
- 利用svcutil.exe 访问windows Server 2003的wcf服务生成客户端代码报错:无法从http://XXX/XXX.svc?wsdl获取元数据”错误的解决方法
- 使用SvcUtil.exe生成客户端代码和配置、WCF Test Client调试WCF
- 通过SvcUtil.exe生成客户端代码和配置
- C#:解决WCF中服务引用 自动生成代码不全的问题。
- WCF_通过使用svcutil.exe将http://*.svc?wsdl生成客户端可调用的.cs文件
- idea使用generator插件自动生成代码工具遇到的问题
- 使用svcutil.exe生成代理代码
- eclipse中使用mybatis-generator逆向代码生成工具问题解决记录
- 使用pyinstaller工具打包python项目代码生成exe文件
- 快速创建WCF服务和svcutil.exe工具使用
- 使用svcutil.exe生成代理代码
- C# 如何使用 svcutil.exe 创建 WCF 客户端代码