Getting the following error when testing my wcf email service (this error happens *only* when sending a very large attachment through the new email service - obviously when the size of the attachment is larger than 65536):
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 question is, I am already setting the MaxReceivedMessageSize property in my web.config to a large value of 500000000, I also used the following code to set the binding in the code of the client itself as well as the service but no change:
BasicHttpBinding binding = new BasicHttpBinding(BasicHttpSecurityMode.Transport);
binding.CloseTimeout = new TimeSpan(00, 5, 00);
binding.OpenTimeout = new TimeSpan(00, 5, 00);
binding.ReceiveTimeout = new TimeSpan(00, 5, 00);
binding.SendTimeout = new TimeSpan(00, 5, 00);
binding.TextEncoding = System.Text.Encoding.UTF8;
binding.MaxReceivedMessageSize = 500000000;
binding.MaxBufferSize = 500000000;
One thing to mention, having set the code above prior to calling the service, do I need to somehow associate the "binding" object with the message prior to calling the service?
Thanks for the help upfront.