Starting WCF Test Client and getting MaxReceivedMessageSize error after increasing in app.config

I am trying to set up my first WCF service in VS 2013. I am busy working on a tutorial but fell into a trap ...

Starting a simple service (DataViewerService) that calls the database to return a recordset. I changed the bindings:

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

      

inside 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>

      

After I figured it out, all I read is that the client and server need to be configured ... However, I run on localhost and I consume it in a wcf test client. I can't figure out where else I need to make these changes ... What the heck am I missing?

+3


source to share


1 answer


enter image description here You need to edit the configuration in the WCF Test Client.

On the right side of the added service, you will see a node called "config file".



Try minimizing your contract to see it

+6


source







All Articles