WCF剩余合同引发异常

时间:2018-11-25 05:13:00

标签: rest wcf

我正在尝试使用带有WebHttpBinding的REST公开一种服务方法。

我能够获得大多数方法的响应,而我希望得到一种方法,在这里我得到以下异常消息。返回状态码500。

请让我知道此错误消息是什么,我应该怎么做才能解决此问题。

异常消息:

  

RexxOnline业务层异常。

     

异常堆栈跟踪:

     

System.ServiceModel.Dispatcher.NetDispatcherFaultException:格式化程序尝试反序列化消息时引发异常:尝试反序列化参数http://Services/2014/04:entity时发生错误。

     

InnerException消息为:
  '反序列化Common.Entities.ExceptionLog类型的对象时出错。读取XML数据时,已超出最大字符串内容长度配额(8192)。通过更改在创建XML阅读器时使用的XmlDictionaryReaderQuotas对象上的MaxStringContentLength属性,可以增加此配额。第44行,位置159。有关更多详细信息,请参见InnerException。

     

System.Runtime.Serialization.SerializationException:反序列化MMSG.Common.Entities.ExceptionLog类型的对象时出错。读取XML数据时,已超出最大字符串内容长度配额(8192)。通过更改在创建XML阅读器时使用的XmlDictionaryReaderQuotas对象上的MaxStringContentLength属性,可以增加此配额。第44行,位置159。

     

System.Xml.XmlException:读取XML数据时,已超出最大字符串内容长度配额(8192)。通过更改在创建XML阅读器时使用的XmlDictionaryReaderQuotas对象上的MaxStringContentLength属性,可以增加此配额。第44行,位置159。

     

在System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader阅读器,       字符串res,字符串arg1,字符串arg2,字符串arg3)
  在System.Xml.XmlDictionaryReader.ReadContentAsString(Int32 maxStringContentLength)
  在System.Xml.XmlBaseReader.ReadElementContentAsString()
  在ReadExceptionLogFromXml(XmlReaderDelegator,XmlObjectSerializerReadContext,XmlDictionaryString [],XmlDictionaryString [])

0 个答案:

没有答案