I have a problem using my application. In it I call several Web services which download a file in CSV format. The file is larger than 15 Mb.
When the file is small I can easily download it, but when I get to 15 Mb it only downloads the same 3 Mb maximum.
I know that this is related to the file app.config
, and although I have tried several ways, I am not able to change it correctly.
How could I make these changes?
Here is the code of the arthivo app.config
:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="DashboardSoap" allowCookies="true"
maxReceivedMessageSize="200000000"
maxBufferSize="200000000"
maxBufferPoolSize="200000000">
<readerQuotas maxDepth="32"
maxArrayLength="2000000"
maxStringContentLength="2000000"/>
<security mode="Transport" />
</binding>
<binding name="DashboardSoap1" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="https://localhost/testApp/Dashboard.asmx"
binding="basicHttpBinding" bindingConfiguration="DashboardSoap"
contract="WS.DashboardSoap" name="DashboardSoap" />
</client>
</system.serviceModel>
</configuration>
Did you also define the "binding" from your client application?:
Server:
Client :
I see that it is a service
asmx
in that case to increase the transfer size you should change the configurationHow to: Enable a Web Service to Send and Receive Large Amounts of Data
In addition to what @LeandroTuttini and @Elenasys suggest
try adding this to your
web.config
orapp.config
You can change the figure because
2147483647
it is the maximum value that aInt32