.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Is buffering or streaming required when response size is up to maximum of 5 MB.

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :SharePoint


I have created a WCF service. It has an operation contract as follows:


List<Report> GetData(string id);

Here the response (i.e. List<Report>) could be maximum upto 5 MB.

Will WCF handle this size response or I need to enable buffering or streaming.




View Complete Post

More Related Resource Links

Cannot create a row of size 8068 which is greater than the allowable maximum of 8060

SQL2K5, SP3, both DB's in 2005 compatability mode. I have the same table in two DB's, that are on the same server. The table in both DB's appears identicle. However, on one of them we get the above error when attempting to do an Insert into the table, and one of them works fine. In 2000, the answer was to "use TEXT", but per BOL 2005, that data type is going away. All ideas are appreciated. CREATE   TABLE [dbo].[Complaint]( [ComplaintId] [int] IDENTITY(1,1) NOT NULL, [SourceId] [smallint] NULL, [MethodId] [smallint] NULL, [Location] [nvarchar] (50) NULL, [CurrentStatusId] [smallint] NOT NULL, [CreateDate] [datetime] NOT NULL, [CreateOpid] [char] (8) NOT NULL, [LastUpdateDate] [datetime] NOT NULL, [LastUpdateOpid] [char] (8) NOT NULL, [DESSiteCodeId] [smallint] NULL, [DESAdminId] [smallint] NULL, [Narrative] [nvarchar] (max) NULL,   CONSTRAINT [PK_Complaint] PRIMARY KEY CLUSTERED ( [ComplaintId] ASC )   WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] )   ON [PRIMARY] GO insert   into [dbo].[Complaint] (   Narrative,CurrentStatusId,CreateDate, CreateOpid ,LastUpdateDate,LastUpdateOpid) values   ('abc' ,1,current_timestamp,'dennis',current_timestamp,'dennis' ) TIA, ChrisRDBA

Database Mail configuring the maximum mail size (not attachment 'MaxFileSize')

Hi can anyone tell me if it's possible to configure the maximum size of an email when using database mail?  I know it's possible to use sysmail_configure_sp to set 'MaxFileSize', I want to prevent an email being sent the size of the body of the email is very large. In my case the body is based on a query result set inserted as html. Thanks      

calculating the size required for backup of database

Hi, How to calculate the size required to take backup of a database in mssql 2000.the results returned by sp_spaceused differ too much from the actual size taken on the disk. Thanks in advance

WCF To WM6 Maximum Message Size Quota Error



I am having some trouble with an error message that keeps popping up on a handheld application. It says 'The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.'

The app talks to a WCF service I've created and after googling around a bit, I discovered the MaxReceivedMessageSize value needed to be set.  However, after doing so in WCF service and setting the bindingConfiguration property to the correct binding element, the same message appears on the handheld.  The handheld app has no binding elements within the .config file and I tried adding the same binding data to this config file but the handheld crashes. What should I do?

Here's the server config binding data:


  <diagnostics wmiProviderEnabled="false">

The maximum message size quota for incoming messages (65536) has been exceeded.


I'm at my wit's end trying to resolve this error.  I am accessing a WCF Service with a Silverlight 4 application.  I have no issues retrieving large amouts of data from the service, but whenever I try to send it back to the service, I get thsi error.  Endless Bing seaches return essentially the same solution, but nothing seems to resolve it.  Below is my web.config:

<behavior name="">
<serviceMetadata httpGetEnabled="true" />

Maximum size of a WriteableBitmap (System.Windows.Media.Imaging.WritableBitmap)

I'm trying to find out the size limits on the WPF WritableBitmap class (ie. System.Windows.Media.Imaging.WritableBitmap, not the Silverlight class with the same name).
In the help for the BitmapSource base class it says:
"The maximum height and width of an image is 2^16 pixels at 32 bits per channel * 4 channels. The maximum size of a BitmapSource is 2^32 bytes (64 gigabytes) and the maximum image size is four gigapixels."
1. By my calculation, 2^32 bytes is 4 Gigabytes, not 64 Gigabytes. So is the size limit 2^32 (4 Gigabytes) or 64 Gigabytes (2^36)? 
2. Are the limits different on 32 and 64 bit versions of the OS?
3. Do these size limits also apply to the derived WriteableBitmap class, or are there further constraints based on available / addressable system memory and/or video (texture) memory?
Thanks in adva

MOSS 2007 - lowering maximum upload size


Hi everyone,

I’m about to lower the maximum upload size for one of my web application. I know there are few files already bigger than the new size I’m going to set. My sense is telling me the new lower size won’t affect the files already uploaded – but I thought I would ask in case anyone experienced anything unexpected?

Say my previous max upload size was 50 mb and now I’m going to set that to 25 mb and I already have files bigger than 25 mb sitting on my database. Do you see any problem with the new size would cause to the exiting files bigger than 25mb?

My environment is MOSS 2007 with SP2 applied and SQL server 2005 with SP3. All running on Windows 2003 Server with SP2.

Thank you in advance for sharing your experience!


Weird application behavior -- Action required to trigger service response otherwise the application



I am a WCF beginner and is trying out with a basic host service with callbacks to the client.

My code works wonders if my client app is a console.exe but when I transferred the code to a Windows Form app, the application will freeze.  But if I right click on the form window task bar, the code suddenly goes through and it would work...

Is there anything wrong with this?

The service is hosted on IIS

Here is my Service code:


[ServiceContract(CallbackContract = typeof





  ConcurrencyMode = ConcurrencyMode.Reentrant)]
 Chat : IChat


WCF: The maximum message size quota for incoming messages (65536) has been exceeded


When using WCF services you may get the following error: "The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element." This error is given because of size limits set to responses in your application configuration.

You need to increase the value of two limiting parameters: maxBufferSite and maxReceivedMessageSize. In my example these values are set to 5000000.

<?xml version="1.0" encoding="utf-8"

Content database maximum size


I understand the database limit is 200Gb. I have added a few content databases as I expect my content to be in excess of 1Tb at peak usage. Where do I set it such that when the database reaches 200Gb then content starts getting stored on another content db and when that one also reaches 200Gb and so on.

Is this something I do in SQL or SharePoint

What is maximum insert commit size?

What is maximum insert commit size?
Mr Shaw

Maximum message size quota for incoming messages (65536) error


Currently I'm developing a windows phone 7 application which accesses web service. However, when I accesses the web service there's an error said :

"The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element."

Yes, I have tried to modify the MaxReceivedMessageSize property in the ServiceReferences.ClientConfig, but it seems the application turn it back to default size when we accessing the web service.

ServiceReferences.ClientConfig :

                <binding name="Contracts277001Soap" maxBufferSize="2147483647"
                    <security mode="None" />

What is the maximum size of binary data (varchar(max)) that 2005 merge replication can tolerate



Since we have experienced creating 2005 ent SP2 merge replication with 60 GB binary data requires 90 hours to finish the whole process(snapshot job + merge job), we just worry that if we still increase the database size to fill in such large binary image and it will finally make merge replication malfunctioning. Just want to ask is there any limitation on image sizes or db sizes if  merge replication need to replicate them? Do u have benchmark testing or experiment that can prove on this upperlimit?

Thanks and regards,




Reduce ASP.NET Page size and complexity using JQuery

This is my first post on asp.net blog. ASP.NET Ajax and JQuery are two different ajax framework. In this post I will show, how we can enhance gridview using ASP.NET Ajax and JQuery. I also compare the implementation of these frameworks. In next posts i will explain more about JQuery and ASP.NET Ajax and also tell you "How to combine the power of both framework". My Future post will related to ASP.NET and related frameworks.

Response.BinaryWrite help needed


Hi all

Im new to .NET and stuck now, so i hope anyone can help my with my problem.

I have a MS SQL database where i have stored some documents as Binary data. I cant figure out how to retrieve them and show/download them in my browser.

I found some guides online and have try to put something together.


private void Write()
 int id = 0;
 string strID = Request.QueryString["id"];
 int.TryParse(strID, out id);

 var db = new ModelDataContext();
 var doc = db.DocumentDatas.Where(x => x.ID == id).FirstOrDefault();

 byte[] byteArray = File.ReadAllBytes(doc);


How do i fill the byteArray with the data?

Thanks in advance :)


Response.Redirect slow


I'm in the middle of migrating servers and on the new server Response.Redirect is extremely slow. It takes around 20 seconds for the browser to get the redirect. This is something that was quick on the existing server. It's an ASP.NET 2.0 application, both servers are running IIS6.

Additionally, if I "manually" do the redirect, it's fast. For example:

Existing way:


takes around 20 seconds on the new server

New way:

Response.Status = "302 Moved Temporarily";
Response.AddHeader("Location", url);

is fast on the new server.

Any ideas why Response.Redirect would be so slow on the new server?

Set Custom Paper size in C#.net 3.5


Dear All,

I have to set custom paper size 6X8 inches

plz tell sugest me code how to do it.

in C#.net 3.5

i m using Asp.net 3.5 Crystal report

i have to do it programiticlly



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend