Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running WCF Test Client and receiving MaxReceivedMessageSize error after increasing in app.config

I am trying to set up my first WCF service in VS 2013. I'm busy working my way through a tutorial, but have hit a snag...

Running a simple Service (DataViewerService) which calls out to a database to return a recordset. I have changed my bindings to:

<bindings>
  <basicHttpBinding>
    <binding allowCookies="true"
             maxReceivedMessageSize="20000000"
             maxBufferSize="20000000"
             maxBufferPoolSize="20000000">
      <readerQuotas maxDepth="32"
           maxArrayLength="200000000"
           maxStringContentLength="200000000"/>
    </binding>
  </basicHttpBinding>
</bindings>

within system.serviceModel, and directly below I have included

<services>
  <service name="DataViewerService.Service1">
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost:8733/Design_Time_Addresses/DataViewerService/Service1/" />
      </baseAddresses>
    </host>
    <endpoint address="http://localhost:2112/Viewer" 
              binding="basicHttpBinding" 
              contract="DataViewerService.IService1"> 
      <identity>
        <dns value="localhost" />
      </identity>
    </endpoint>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
  </service>
</services>

Having googled around, all I read is that the client and server both need to be set... However, I am running on localhost, and I am consuming within the wcf Test Client. I can't seem to figure out where else I need to make these changes... What the heck am I missing?

like image 543
mrwienerdog Avatar asked Oct 07 '14 13:10

mrwienerdog


1 Answers

enter image description hereYou need to edit the config on the WCF Test client.

Right at the bottom of your added service you will see a node called "Config file".

Try minimizing your contract to see it

like image 76
daveBM Avatar answered Sep 21 '22 02:09

daveBM