Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Sir,

Here is my error, I am getting when I implemented WCF Services with nettcpbinding.
I am just reading an string which is in text file and the size of it is around 8MB, i converted it into bye and then read that, so in string it is returning the data , I saw this in debugging but when it is returning this string data to service client on self hosted environment it shows this error :
The maximum message size quota for incoming messages (65536) has been exceeded

here is my app.config please check that :


<configuration>

<appsettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true">

<system.web>
<compilation debug="true">
<httpruntime maxrequestlength="89535600">


<system.webserver>
<security>
<requestfiltering>
<requestlimits maxallowedcontentlength="89535600">



<!-- When deploying the service library project, the content of the config file must be added to the host's
app.config file. System.Configuration does not support config files for libraries. -->
<system.servicemodel>
<client>
<endpoint binding="netTcpBinding" bindingconfiguration="TcpSampleBinding">
contract="WcfServiceLibrary1.IService1" name="SampleClientBinding" />

<bindings>
<nettcpbinding>
<binding name="TcpSampleBinding" closetimeout="00:20:00" opentimeout="00:20:00">
receiveTimeout="00:20:00" sendTimeout="00:20:00" transactionFlow="false"
transferMode="Streamed" maxBufferPoolSize="524288" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerquotas maxdepth="64" maxstringcontentlength="10240" maxarraylength="16384">
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="Transport">



<behaviors>
<servicebehaviors>
<behavior name="SampleTestServiceBehaviour">
<servicedebug includeexceptiondetailinfaults="true">
<servicemetadata>



<services>
<service behaviorconfiguration="SampleTestServiceBehaviour" name="WcfServiceLibrary1.Service1">
<endpoint address="" binding="netTcpBinding">
name="SampleNetTcpBinding" contract="WcfServiceLibrary1.IService1" />
<endpoint address="mex" binding="mexTcpBinding" bindingconfiguration="">
name="NetTcpMaxBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseaddress="net.tcp://localhost:19957/SampleSvc">
</baseAddresses>






Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900