maxstringcontentlength

Sending object to WCF service. MaxStringContentLength (8192 bytes) exceeded when deserializing

Deadly 提交于 2019-12-31 03:58:25
问题 I created a simple WCF web service that has one method: SubmitTicket(flightticket ft, string username, string password) On the client side, I have an application for filling out a form (a flight ticket) and sending it to this newly created web service. When this flightticket object exceeds 8192bytes I get the following error: "There was an error deserializing the object of type flightticket. The maximum string content length quota (8192) has been exceeded while reading XML data. This quota

WCF: maxStringContentLength always set to 8192

只谈情不闲聊 提交于 2019-12-18 12:18:53
问题 I need to change the maxStringContentLength to a value larger than 8192 but have not been successful in doing it. My WCF service will generate an exception if the amount of data it receives is greater than 8192 bytes. I have exhausted my searches and nothing seems to help. I should point out that the exception comes from the server. Forget about the client because I am seeing the exception generated straight from WCF on the server. Here is my web.config settings: <system.serviceModel>

WCF MaxStringContentLength is never updated!

雨燕双飞 提交于 2019-12-12 19:23:52
问题 Coders, This problem is driving me crazy!! I have been doing extensive research for the last 2 days and I have no idea what is going on. The Problem: As the title says, I have a WCF service that gets consumed by a silverlight application. The problem is that whenever I try to consume one of the WCF operations I receive this error: The maximum string content length quota (8192) has been exceeded while reading XML data. I know that I am supposed to change the value of MaxStringContentLength in

Error calling a WCF REST service using JSON. length quota (8192) exceeded

不想你离开。 提交于 2019-12-07 22:30:50
问题 I’m having a WCF REST service hosted in IIS using .NET 4 RC. The POST calls to the service are serialized using JSON. Everything works fine until the size of one of the DataMember (string) is longer than 8K. In this case I receive the error described below indicating the MaxStringContentLength has been exceeded. The maxStringContentLength attribute for the endPoint has been increased and it is correctly read from the config file. Web config is: <services> <service name="MyServiceServer" >

Error calling a WCF REST service using JSON. length quota (8192) exceeded

有些话、适合烂在心里 提交于 2019-12-06 06:16:07
I’m having a WCF REST service hosted in IIS using .NET 4 RC. The POST calls to the service are serialized using JSON. Everything works fine until the size of one of the DataMember (string) is longer than 8K. In this case I receive the error described below indicating the MaxStringContentLength has been exceeded. The maxStringContentLength attribute for the endPoint has been increased and it is correctly read from the config file. Web config is: <services> <service name="MyServiceServer" > <endpoint address="http://localhost/MyService" kind="webHttpEndpoint" endpointConfiguration=

Specifying a WCF binding when using ServiceRoute

人走茶凉 提交于 2019-12-06 01:44:41
问题 I am currently registering a WCF service using the following code: var factory = new DefaultServiceHostFactory(); RouteTable.Routes.Add(new ServiceRoute("XXXEndPoint", factory, IXXXEndPoint))); This is all well and good however I also need to change the MaxStringContentLength property of the reader quota settings. It appears that the default value of 8192 is used, regardless of my attempts to change this and I guess this is from the DefaultServiceModel? Are there any suitable hooks to

Error Serializing String in WebService call

☆樱花仙子☆ 提交于 2019-12-04 16:46:48
问题 This morning I ran into an issue with returning back a text string as result from a Web Service call. the Error I was getting is below ************** 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

Specifying a WCF binding when using ServiceRoute

白昼怎懂夜的黑 提交于 2019-12-04 06:28:25
I am currently registering a WCF service using the following code: var factory = new DefaultServiceHostFactory(); RouteTable.Routes.Add(new ServiceRoute("XXXEndPoint", factory, IXXXEndPoint))); This is all well and good however I also need to change the MaxStringContentLength property of the reader quota settings. It appears that the default value of 8192 is used, regardless of my attempts to change this and I guess this is from the DefaultServiceModel? Are there any suitable hooks to override this setting on the DefaultServiceModel, or should I be deriving my own service host/model classes,

Error Serializing String in WebService call

余生长醉 提交于 2019-12-03 10:43:26
This morning I ran into an issue with returning back a text string as result from a Web Service call. the Error I was getting is below ************** 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

Sending object to WCF service. MaxStringContentLength (8192 bytes) exceeded when deserializing

跟風遠走 提交于 2019-12-02 04:07:32
I created a simple WCF web service that has one method: SubmitTicket(flightticket ft, string username, string password) On the client side, I have an application for filling out a form (a flight ticket) and sending it to this newly created web service. When this flightticket object exceeds 8192bytes I get the following error: "There was an error deserializing the object of type flightticket. 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