0

While Downloading large zip file size is 10GB using c#. i am getting error like 'The page was not displayed because the request entity is too large.' already i am given the app command in iis and

  appcmd.exe set config -section:system.webserver/serverruntime /uploadreadaheadsize: 1048576   /commit:apphost

and i have changed the config file

    <system.serviceModel>
     <bindings>
       <basicHttpBinding>
         <binding maxReceivedMessageSize="10485760">
          <readerQuotas ... />
      </binding>
       </basicHttpBinding>
     </bindings>  
   </system.serviceModel>
arun
  • 323
  • 6
  • 17

1 Answers1

2

maxReceivedMessageSize is in bytes.

You specified 10MB instead of 10GB, you could change it to 10 * 1024 * 1024 * 1024:

 <binding maxReceivedMessageSize="10737418240">

But that won't work due to a limit as described here.

Community
  • 1
  • 1
thumbmunkeys
  • 20,606
  • 8
  • 62
  • 110
  • hi i given appcmd.exe set config -section:system.webserver/serverruntime /uploadreadaheadsize:12884901888 /commit:apphost but i am getting error – arun Oct 10 '14 at 12:12
  • @thumbunkeys:C:\Windows\System32\inetsrv>appcmd.exe set config "SCS WEB 1234" -section:system .webServer/serverRuntime /uploadReadAheadSize:"12884901888" /commit:apphost ERROR ( message:Can not set attribute "uploadReadAheadSize" to value "1288490188 8".. Reason: Not a valid unsigned integer . ) – arun Oct 10 '14 at 12:22
  • a simple search for the error message yielded this http://stackoverflow.com/questions/4022434/how-to-set-the-maxallowedcontentlength-to-500mb-while-running-on-iis7 – thumbmunkeys Oct 10 '14 at 12:27
  • if i have 10gb file means how can i download – arun Oct 10 '14 at 12:46