Today I discovered the some configuration impacts from my choice to return the XML document as a string property. Because I am using a string property to return the XML generated by my service. I had to adjust three properties in the service and client configuration.
MaxBufferSize property - (From MSDN) Gets or sets the maximum size of the buffer to use. For buffered messages this value is the same as MaxReceivedMessageSize. For streamed messages, this value is the maximum size of the SOAP headers, which must be read in buffered mode.
MaxReceivedMessageSize must also match what you put in the MaxBufferSize. Default is 65536.
MaxStringContentLength - (From MSDN) Gets and sets the maximum string length returned by the reader. Default is 8192.
for example:
System.ServiceModel.BasicHttpBinding ad = new System.ServiceModel.BasicHttpBinding();
ad.ReaderQuotas.MaxStringContentLength = 2147483647;
ad.MaxReceivedMessageSize = 2147483647;
ad.MaxBufferSize = 2147483647;
XYZervices.XYZServiceClient proxy = new XYZServices.XYZServiceClient(ad, new
System.ServiceModel.EndpointAddress("http://localhost:58297/XYZService.svc"));
var Data = proxy.GetBookingData("ABX", "TTT", 900);