首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

参数序列化疏失,请大家指点

2012-11-03 
参数序列化出错,请大家指点。Therewasanerrorwhiletryingtoserializeparameterhttp://tempuri.org/:obj.The

参数序列化出错,请大家指点。
There was an error while trying to serialize parameter http://tempuri.org/:obj. The InnerException message was 'Type 'Tim.WCFService.Contract.DataContract.hia ' with data contract name 'hia:http://schemas.datacontract.org/2004/07/Tm.WCFService.Contract.DataContract ' is not expected. Add any types not known  
statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer. '. Please see InnerException for more details. 

错误如上 

大家有没有遇到过类似的问题,多谢了。

[解决办法]
Tim.WCFService.Contract.DataContract.hia 的类型不是hia:http://schemas.datacontract.org/2004/07/Tm.WCFService.Contract.DataContract 的预期类型

[解决办法]
你的代码呢?

是不是你有那种不能序列化的参数啊?
[解决办法]
检查一下,是不是类型问题。
我没遇到 过,只是看error信息,感觉
[解决办法]
不懂
[解决办法]
是什么类型的参数?如果不行自己重写个序列化的方法和反序列化的方法

热点排行