I have a WCF service with Entity Framework 6 self hosted in a simple Winforms app. I have a WPF client app which hooks into this service via basicHttpbinding
. On startup the client app requests a SELECT *
from a large table. I need the full data set back, however the transfer across http is very slow. I have run a trace on the server and the query is dealt with very quickly by the db however the text is taking too long to return to the client. If I SELECT TOP 200
the client app is very quick so I know it's the volume of data slowing everything down. This is my client config which is mirrored server side:
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IIsesService" maxBufferSize="2147483647"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" useDefaultWebProxy="false"/>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:8080/" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IIsesService" contract="ServiceReference.IIsesService"
name="BasicHttpBinding_IIsesService" />
</client>
I have been reading around but confused as how to tackle this issue. Unfortunately I can't page the results as the end user needs all results in a dataGrid. I am best trying to write a custom binding to allow compression or should I define Mtom or binary transfer? Can I switch to Net TCP binding when self hosting in Winforms?