MaxRequestLength in web.config makes an internal error

Hi guys, I want my users to be able to upload huge files, so I change my web.config to this:

     <configuration>
     <configSections>
      <sectionGroup name="applicationSettings"    type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0,    Culture=neutral, PublicKeyToken=" >
        <section name="delegatezanjan.Properties.Settings"    type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0,   Culture=neutral, PublicKeyToken=" requirePermission="false" />
      </sectionGroup>
    </configSections>
        <system.web>
      <compilation debug="true" targetFramework="4.0">
         <assemblies>
          <add assembly="System.Design, Version=4.0.0.0, Culture=neutral,   PublicKeyToken="/>
        </assemblies>
        </compilation>
       <httpRuntime/>
  <httpRuntime maxRequestLength="200000" executionTimeout="99999"/>
    </system.web>
    <system.serviceModel>
      <bindings>
        <basicHttpBinding>
        <binding name="smsSendWebServiceSoap" />
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://aryanmsg.ir/smsSendWebService.asmx"
        binding="basicHttpBinding" bindingConfiguration="smsSendWebServiceSoap"
        contract="ServiceReference1.smsSendWebServiceSoap" name="smsSendWebServiceSoap" />
    </client>
     </system.serviceModel>
    <applicationSettings>
    <delegatezanjan.Properties.Settings>
      <setting name="delegatezanjan_ir_smsline_webservice_SMS_WebServer_Service"
        serializeAs="String">
        <value></value>
      </setting>
    </delegatezanjan.Properties.Settings>
     </applicationSettings>
     <system.webServer>
      <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="2147483648" />
        </requestFiltering>
      </security>
    </system.webServer>



</configuration>

Before adding this part, my code works, but after adding the last three lines, my site returns an internal internal server error . There is a problem with the resource you are looking for and cannot be displayed.

+4
source share
3 answers

Assuming this as an answer :)

You have twice declared httpRuntime in your configuration. You

<httpRuntime /> 

as well as

<httpRuntime maxRequestLength="2000000000" executionTimeout="99999999"/>
+15
source

maxRequestLength 2 (2147483648) maxAllowedContentLength 4 (4294967295), , , Ultimate uploader .

+3

Repeatedly adding a line

gives 500 errors

Find out which one already exists in your network configuration file

0
source

Source: https://habr.com/ru/post/1529402/


All Articles