kalo yorburgh
kalo yorburgh

Reputation: 11

How can I increase the maxReceivedMessageSize when calling a WCF from VB6?

At the moment I have: 1 ) a WCF setup to return a block of xml (specifically it is the contents of a calendar from Exchange 2003). 2 ) a vb6 form with a command on it accessing the WCF via an object built on the service moniker including the content of the WSDL contract file.

This is working fine only when the string being passed across is of an acceptable size. When i attempt to return the whole xml generated on the WCF-side i encounter 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."

When i add a binding-configuration into the WCF app-config to increase the maxReceivedMessageSize, this has no effect - presumably as the VB6 client is blind to this. (the WSDL contract generated doesn't even include the value in its xml)

Reading around*, there is the suggestion that i need to make a similar config change on the client-side. So i have created a VB6.EXE.CONFIG file and copied the binding-configuration details to to this. i have then extended the moniker to include this : binding=WSHttpBinding_IExchange, bindingNamespace='Exchange', bindingConfiguration='ExchangeBinding'

I am however still receiving the same error message regarding the size quota.

when mis-spelling the binding or bindingNamespace elements of the moniker above i get an expected error, but when mis-spelling the bindingConfiguration element i get no error, as if this element is irrelevant anyway.

I seem to have the pieces but not the working solution at the moment. Any ideas anyone?

Upvotes: 1

Views: 733

Answers (1)

UnhandledExcepSean
UnhandledExcepSean

Reputation: 12804

Personally, I would create a .NET COM exposed library that you call from the VB6. The .NET library could control all of the client binding and VB6 would be simply talking with a DLL and passing strings around.

Upvotes: 0

Related Questions