473,405 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

WFC problem

Hi there.

I'm having a problem with a Web Service that I've created. This WS has
several simple methods, that are working fine... no problem with code.

However, when retieving a bigger number of rows, I get this 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. "

I then searched google for some help/explanation and I found this site,
amoung others:

http://forums.microsoft.com/MSDN/Sho...34670&SiteID=1

Initialy, my web config on the server is like this:
------------------------
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<compilation defaultLanguage="c#" />
</system.web>

</configuration>
------------------------

If I follow the instructions on that post, my WS returns error.

How can I configurate this??

Thanks in advance,

Marco
Jun 27 '08 #1
5 6410
Are you sure that is your web.config? WCF typically has a LOT more
config than that (in system.ServiceModel), for either the client or the
server.

If your app is setting up the configuration through code (which is
entirely possible with WCF) then you need to find the bit of code that
configures the binding. Note that these quotas don't just apply to the
server; setting it at the server is useful for uploading larger arrays
etc, but the quotas may need to be independently set at the client if
the problem is the server *returning* too much data.

Marc
Jun 27 '08 #2
I've re-read your post, and indeed it looks like a client issue; try
changing app.config at the client instead. For example, for basic-http
you might have:

<bindings>
<basicHttpBinding>
<binding ... maxReceivedMessageSize="6553600" maxBufferSize="6553600">
<readerQuotas maxArrayLength="250000" />
</binding>
</basicHttpBinding>
</bindings>

Additionally, you might want to think about using streamed MTOM if you
are returning binary; you can add transferMode="Streamed" and
messageEncoding="Mtom" to "binding" for basic-http (but not for all
bindings) - but you need to do this at both the client and the server or
it will break [which is why I didn't add them above].
The quotas etc should be fine set at one end only (since it is expected
that client and server should have different quotas).

Marc
Jun 27 '08 #3
Thanks for the reply.

So, you say that I can configure client independently, without the need to
configure the server? The problem is when downloading data, never with
upload. And how can I do this? Because I used this client config:

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

<configuration>

<system.serviceModel>

<bindings>

<basicHttpBinding>

<binding name="ServiceSoap" closeTimeout="00:01:00" openTimeout="00:01:00"

receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"

bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"

maxBufferSize="65536" maxBufferPoolSize="524288"
maxReceivedMessageSize="65536"

messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"

useDefaultWebProxy="true">

<readerQuotas maxDepth="32" maxStringContentLength="8192"
maxArrayLength="16384"

maxBytesPerRead="4096" maxNameTableCharCount="16384" />

<security mode="None">

<transport clientCredentialType="None" proxyCredentialType="None"

realm="" />

<message clientCredentialType="UserName" algorithmSuite="Default" />

</security>

</binding>

</basicHttpBinding>

</bindings>

<client>

<endpoint address="http://servidor:8080/ws/Service.asmx"
binding="basicHttpBinding"

bindingConfiguration="BasicHttpBinding_IOrderServi ce"
contract="IOrderService"

behaviorConfiguration="LargeQuotaBehavior"

name="ServiceSoap" />

</client>

</system.serviceModel>

</configuration>
and I get this error:

"There is no endpoint behavior named 'LargeQuotaBehavior'. "

Thanks in advance.

"Marc Gravell" <ma**********@gmail.comescreveu na mensagem
news:uN**************@TK2MSFTNGP03.phx.gbl...
Are you sure that is your web.config? WCF typically has a LOT more config
than that (in system.ServiceModel), for either the client or the server.

If your app is setting up the configuration through code (which is
entirely possible with WCF) then you need to find the bit of code that
configures the binding. Note that these quotas don't just apply to the
server; setting it at the server is useful for uploading larger arrays
etc, but the quotas may need to be independently set at the client if the
problem is the server *returning* too much data.

Marc

Jun 27 '08 #4
behaviorConfiguration relates to the "behaviors" element, and can be
used to create your own stack with custom listeners etc. I think you can
remove this attribute; bindingConfiguration relates to the binding -
you've named this "ServiceSoap", so this is what the
bindingConfiguration attribute should say.

"BasicHttpBinding_IOrderService" looks like it should be the name (which
can often actually be left blank).

So try:

<client>
<endpoint address="http://servidor:8080/ws/Service.asmx"
binding="basicHttpBinding"
bindingConfiguration="ServiceSoap"
contract="IOrderService"
name="BasicHttpBinding_IOrderService" />
</client>

If you get errors about not finding the configuration, try removing the
name attribute. Also - I'm a little worried about it finding the
contract - I usually use the full-qualified name
(Foo.Bar.IOrderService), but if it works...

Marc
Jun 27 '08 #5
So, you say that I can configure client independently,
without the need to configure the server?
This is pretty-much limited to quotas, maximum sizes, and behaviors
(i.e. a behavour can be used to inject error-handling or performance
metrics - these aren't part of the channel itself). Pretty-much
everything else must match. It will tell you soon enough if there is a
problem...

Marc
Jun 27 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Kostatus | last post by:
I have a virtual function in a base class, which is then overwritten by a function of the same name in a publically derived class. When I call the function using a pointer to the derived class...
117
by: Peter Olcott | last post by:
www.halting-problem.com
18
by: Ian Stanley | last post by:
Hi, Continuing my strcat segmentation fault posting- I have a problem which occurs when appending two sting literals using strcat. I have tried to fix it by writing my own function that does the...
28
by: Jon Davis | last post by:
If I have a class with a virtual method, and a child class that overrides the virtual method, and then I create an instance of the child class AS A base class... BaseClass bc = new ChildClass();...
6
by: Ammar | last post by:
Dear All, I'm facing a small problem. I have a portal web site, that contains articles, for each article, the end user can send a comment about the article. The problem is: I the comment length...
16
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by...
2
by: Mike Collins | last post by:
I cannot get the correct drop down list value from a drop down I have on my web form. I get the initial value that was loaded in the list. It was asked by someone else what the autopostback was...
0
by: =?Utf-8?B?am8uZWw=?= | last post by:
Hello All, I am developing an Input Methop (IM) for PocketPC / Windows Mobile (PPC/WM). On some devices the IM will not start. The IM appears in the IM-List but when it is selected from the...
1
by: sherifbk | last post by:
Problem description ============== - I have 4 clients and 1 server (SQL server) - 3 clients are Monitoring console 1 client is operation console - Monitoring console collects some data from...
9
by: AceKnocks | last post by:
I am working on a framework design problem in which I have to design a C++ based framework capable of solving three puzzles for now but actually it should work with a general puzzle of any kind and I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.