473,809 Members | 2,469 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

maximum string content length quota exceeded

154 New Member
Hi I am pretty new to .net

I tried to make a console client to call wcf service and print the response in the console. I get this error when i run the code.

Error in deserializing body of reply message for operation 'RetrieveData'. The m
aximum string content length quota (8192) has been exceeded while reading XML da
ta. This quota may be increased by changing the MaxStringConten tLength property
on the XmlDictionaryRe aderQuotas object used when creating the XML reader.

How could I get the response to be printed to the consolea and fix the limit?
Should I write this differently if i cannot change the limit?

Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using NativeClient.ServiceReference1;
  6.  
  7. namespace NativeClient
  8. {
  9.     class Program
  10.     {
  11.  
  12.         static void Main(string[] args)
  13.         {
  14.  
  15.             string xmlstyle;
  16.             xmlstyle = "AE54545";
  17.  
  18.             NativeQuery(xmlstyle);
  19.         }
  20.         static string NativeQuery(string filePath)
  21.         {
  22.             string result = string.Empty;
  23.             try
  24.             {
  25.                 EnterpriseNativeDataServiceClient serviceClient = new EnterpriseNativeDataServiceClient();
  26.                 result = serviceClient.RetrieveData(filePath);
  27.                 serviceClient.Close();
  28.                 Console.Out.WriteLine("XML RESULT " + result);
  29.                 Console.In.ReadLine();
  30.  
  31.             }
  32.             catch (Exception ex)
  33.             {
  34.                 result = ex.Message;
  35.                 Console.Out.WriteLine(ex.Message);
  36.                 Console.Out.WriteLine(ex.StackTrace);
  37.                 Console.In.ReadLine();
  38.                 if (ex.InnerException != null)
  39.                 {
  40.                     Console.Out.WriteLine(ex.InnerException.Message);
  41.                     Console.Out.WriteLine(ex.InnerException.StackTrace);
  42.                 }
  43.             }
  44.             return result;
  45.         }
  46.  
  47.  
  48.     }
  49. }
  50.  
  51.  
  52.  
  53.  
Feb 23 '12 #1
0 1897

Sign in to post your reply or Sign up for a free account.

Similar topics

4
18346
by: sumithradevi | last post by:
Hello Friends, I am getting the following error. java.sql.SQLException: ORA-00020: maximum number of processes (100) exceeded I am closing all my resultsets and all my connections in the try block. should i close ResultSets and Connections in the catch block aswell?.
1
3522
by: PerryG | last post by:
We have a .NET 1.1 client which is sending a gzipped soap request using HttpWebRequest to an Apache server. The Apache server is using a the 'mod_deflate' server to decompress the incoming message, and to also compress the response (GZIP). The mod_deflate filter requires the 'Content-Length' header contained within the incoming request to specify the number of UNCOMPRESSED bytes being sent and not the actual bytes of the body of the...
1
3468
by: Nuno Magalhaes | last post by:
I'm doing a "low level" project that consists on monitoring certain QoS parameters such as: Time to resolve dns, time to connect, time to receive data, time to receive all web page, time to close connection, between others... Since that I cannot use any higher level procedures such as WebClient, HTTPWebRequest and Response. The problem is that I'm not getting the "Content-Length" parameter in the HTTP response header. Do you know if...
1
3216
by: emielvl | last post by:
Hello, I'm developing a client/server architecture based on the XML-RPC implementation in php4. All works pretty well, except that in the response from the server there is no "Content-Length" in the header. Since the XML-RPC specification requires this header to be present in the server response, some libraries (notably: libxmlrpc++) choke on this. For clarity, here's a (simple) server (slightly altered from:...
1
4043
by: lawrence k | last post by:
I've a site where I've just installed a new version of phpMyAdmin (version 2.8.1). I can't get it to work. I'm getting this error: Warning: session_write_close(): write failed: Disk quota exceeded Warning: session_write_close(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp)
0
1482
by: Andy Fish | last post by:
Hi, I have noticed some strange behaviour of the content-length header in my asp.net 1.1 application. In this case I am streaming a word document with this code: Response.AddHeader("Content-Length", "394893"); Response.ContentType = "application/msword"; Response.AddHeader("Content-Disposition", "attachment; filename=sample.doc" );
0
1254
by: Scott McFadden | last post by:
For some reason, ASP.NET is not returning the content length header in my webservice response that returned a byte array buffer over SSL. Here is the actual response headers trace over SSL (using Charles) for an HTTP POST: HTTP/1.0 200 OK Server: Microsoft-IIS/5.0 Date: Thu, 12 Oct 2006 23:47:06 GMT X-Powered-By: ASP.NET X-AspNet-Version: 1.1.4322 Cache-Control: private, max-age=0
3
4330
by: Bob Murdoch | last post by:
I'm using the following to send a binary file to a user: Response.AddHeader('Content-Disposition','attachment;filename=' + Request('FileName') + ';'); var vType = 'application/octetstream'; var vFileName = String(Request('FileName')).toLowerCase(); if (vFileName.indexOf('.xls') -1) vType = 'application/vnd.ms-excel'; if (vFileName.indexOf('.csv') -1)
2
4236
by: Steven Cheng | last post by:
Hi Gary, As for the setting you mentioned, it is used to custimze the received data size limitation of WCF binding(such as NetTcpBinding or HttpBinding). After you have definite a customized Binding setting, you can apply it to your WCF service via the "bindingConfiguration" attribute of each <endpoint> here is a simple WCF service configuration in web.config which demonstrate this:
0
1770
by: beulajo | last post by:
Hai, How to get Httpwebresponse content length?? When I give resp.contentlength, it gives -1. what could be the problem I have a set up called HTTP analyzer, which analyses and gives me the request header and response header, there it returns some value as content length in response string But the same thing when I try to get using C#.net, I m not able to get the content length for the same url and credential, I get only -1
0
9603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10643
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10378
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10121
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9200
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4333
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.