Sáng nay tôi gặp sự cố khi trả lại chuỗi văn bản do cuộc gọi Dịch vụ web. Lỗi tôi đã nhận được dướiLỗi Chuỗi tuần tự hóa trong WebService gọi
************** Exception Text **************
System.ServiceModel.CommunicationException: Error in deserializing body of reply message for operation 'GetFilingTreeXML'. ---> System.InvalidOperationException: There is an error in XML document (1, 9201). ---> System.Xml.XmlException: The maximum string content length quota (8192) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 9201.
at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, String res, String arg1, String arg2, String arg3)
at System.Xml.XmlExceptionHelper.ThrowMaxStringContentLengthExceeded(XmlDictionaryReader reader, Int32 maxStringContentLength)
at System.Xml.XmlDictionaryReader.ReadString(Int32 maxStringContentLength)
at System.Xml.XmlDictionaryReader.ReadString()
at System.Xml.XmlBaseReader.ReadElementString()
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderImageServerClientInterfaceSoap.Read10_GetFilingTreeXMLResponse()
at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer9.Deserialize(XmlSerializationReader reader)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, MessagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest)
--- End of inner exception stack trace ---
tôi đã tìm kiếm và kết quả là dưới đây: Search Results
Hầu hết đó là những WCF liên quan nhưng đã đủ để chỉ cho tôi đi đúng hướng. Tôi sẽ đăng câu trả lời dưới dạng trả lời.
lại: cờ của bạn; phức tạp hơn thế. Vui lòng yêu cầu [meta]. – Will
Xin lỗi vì đã hỏi rõ ràng: Bạn có thể kiểm tra xem chuỗi bạn đang quay trở lại từ dịch vụ web có dài hơn 8192 byte không? – Espo
có thời gian lâu hơn và tôi phải cập nhật tệp cấu hình, như đã đề cập trong bài đăng trên blog được liên kết và đã sửa nó. cảm ơn cho trả lời – MikeScott8