# .NET and More > WPF, WCF, WF >  [RESOLVED] The maximum message size quota for incoming messages (65536)... In WCF, using vb.net

## tgf-47

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.

How do I resolve this problem?

----------


## chris128

The error message is telling you roughly what to do, even giving you the exact property name you need to modify, so why not google that property and see how to use it?

Are you using a config file to configure your WCF service or are you building the service via code?

----------


## tgf-47

I did that before posting this thread. I found a few articles on the subject and followed the instructions of each. All of them came down to the same thing eventually, editing the amount of incoming messages allowed. All of those made perfect sense, but it's as if the program ignores that part of the code thus raising the same error.

I am using a config file, generated by vb

----------


## chris128

Ah ok, you should have explained that in your original post  :Wink: 
I remember I had a similar issue with WCF once, not with that particular attribute, but with a similar one that limited the amount of items that could be in the "object graph", and I followed all of the tutorials but the program ignored my changes. It turned out that it was not actually using the config file at all, because when I removed all of my service endpoints from the config file the program still ran as normal, where as it should have told me that no endpoints were configured. Can you try doing the same thing just to confirm whether or not your app is actually looking at the config file at all - comment out all of the service endpoints (including the MEX endpoint if you have one) and then try and start your service host and see what happens...

----------


## Lightning

First we ned to know, do you use a config file that contains the bindings OR do you make the bindings in codE?

----------


## tgf-47

Thanks guys. Chris, your post got me thinking and I went and had a good look at what is happening. Turns out the Service in the main (Windows Form) project is only compiled once and from there on in it doesn't actually use the WCF project anymore. It then uses the code that is compiled in the service. Then to my surprise I fixed all my problems with literally two clicks.

1) Right-click on the service that is stored in your project under the folder named "Service References".
2) Click on "Update Service References"

----------


## chris128

> First we ned to know, do you use a config file that contains the bindings OR do you make the bindings in codE?


That was the first thing I asked and the OP already said he is using a config file  :Wink: 

Anyway, glad to hear you got it sorted TGF-47  :Smilie:

----------


## tgf-47

Yes I didn't know that it worked that way. I thought it loaded the files from the WCF project each time.
That is why I gave you the wrong answer. But thanx for the help.

----------


## chris128

You didnt give the wrong answer, I was just pointing it out to Lightning  :Smilie: 

Dont forget to mark the thread as Resolved  :Wink:

----------


## Lightning

Damn was sleeping....

----------

