日期:2014-05-17  浏览次数:20472 次

Asp.net项目添加了wcf服务,添加服务没有问题。编译出错
详细错误信息:
错误 37 Reference.svcmap: 未能为服务引用“WcfService.Nav”生成代码。  无法导入 wsdl:portType  详细信息: 在运行 WSDL 导入扩展时引发异常: System.ServiceModel.Description.DataContractSerializerMessageContractImporter  错误: 类型“Newtonsoft.Json.Linq.JToken”是不支持的递归集合数据协定。请考虑修改集合“Newtonsoft.Json.Linq.JToken”的定义,移除对其自身的引用。  错误来源的 XPath: //wsdl:definitions[@targetNamespace='www.valorcomm.com']/wsdl:portType[@name='NAVService']  无法导入 wsdl:binding  详细信息: 导入 wsdl:binding 所依赖的 wsdl:portType 时出错。  wsdl:portType 的 XPath: //wsdl:definitions[@targetNamespace='www.valorcomm.com']/wsdl:portType[@name='NAVService']  错误来源的 XPath: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_NAVService']  无法导入 wsdl:port  详细信息: 导入 wsdl:port 所依赖的 wsdl:binding 时出错。  wsdl:binding 的 XPath: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_NAVService']  错误来源的 XPath: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='NAVService']/wsdl:port[@name='BasicHttpBinding_NAVService'] App_WebReferences/WcfService/Nav/

------解决方案--------------------
新人学习学习!!!
------解决方案--------------------
看有没有用
http://stackoverflow.com/questions/11112960/visual-studio-2012-error-reference-svcmap-throwing-error
------解决方案--------------------
问题已解决。是一个交Newtonsoft.Json.Net20.dll的组件的问题。删掉就ok了。