.net - Increasing the max length of file in the upload in asp.net application -


i have asp.net mvc application uploading projects files. things works fine , have problem, can't upload file length > 200mo. think problem in iis configuration , see many tutorials without finding soltion increase max length of file supported iis.

i think handicap if have big file upload it( > 200mo) , application limit max length, other language java or php problem didn't exist.

i have 2 web.config file:

<?xml version="1.0" encoding="utf-8"?>  <configuration>   <configsections>     <sectiongroup name="system.web.webpages.razor" type="system.web.webpages.razor.configuration.razorwebsectiongroup, system.web.webpages.razor, version=2.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35">       <section name="host" type="system.web.webpages.razor.configuration.hostsection, system.web.webpages.razor, version=2.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="false" />       <section name="pages" type="system.web.webpages.razor.configuration.razorpagessection, system.web.webpages.razor, version=2.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" requirepermission="false" />     </sectiongroup>   </configsections>    <system.web.webpages.razor>     <host factorytype="system.web.mvc.mvcwebrazorhostfactory, system.web.mvc, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" />     <pages pagebasetype="system.web.mvc.webviewpage">       <namespaces>         <add namespace="system.web.mvc" />         <add namespace="system.web.mvc.ajax" />         <add namespace="system.web.mvc.html" />         <add namespace="system.web.optimization"/>         <add namespace="system.web.routing" />       </namespaces>     </pages>   </system.web.webpages.razor>    <appsettings>     <add key="webpages:enabled" value="false" />   </appsettings>    <system.web>     <httphandlers>       <add path="*" verb="*" type="system.web.httpnotfoundhandler"/>     </httphandlers>      <httpruntime executiontimeout="110" maxrequestlength="500480"/>     <pages         validaterequest="false"         pageparserfiltertype="system.web.mvc.viewtypeparserfilter, system.web.mvc, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35"         pagebasetype="system.web.mvc.viewpage, system.web.mvc, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35"         usercontrolbasetype="system.web.mvc.viewusercontrol, system.web.mvc, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35">       <controls>         <add assembly="system.web.mvc, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" namespace="system.web.mvc" tagprefix="mvc" />       </controls>     </pages>   </system.web>    <system.webserver>     <validation validateintegratedmodeconfiguration="false" />      <handlers>       <remove name="blockviewhandler"/>       <add name="blockviewhandler" path="*" verb="*" precondition="integratedmode" type="system.web.httpnotfoundhandler" />     </handlers>   </system.webserver> </configuration> 

and

<?xml version="1.0"?> <!--   pour plus d’informations sur la configuration de votre application asp.net, consultez la page   http://go.microsoft.com/fwlink/?linkid=169433   --> <configuration>   <configsections>     <!-- more information on entity framework configuration, visit http://go.microsoft.com/fwlink/?linkid=237468 -->     <section name="entityframework" type="system.data.entity.internal.configfile.entityframeworksection, entityframework, version=5.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" requirepermission="false"/>   </configsections>   <connectionstrings>     <add name="defaultconnection" connectionstring="data source=(localdb)\v11.0;initial catalog=aspnet-upload-20130516112545;integrated security=sspi;attachdbfilename=|datadirectory|\aspnet-upload-20130516112545.mdf" providername="system.data.sqlclient"/>   </connectionstrings>   <appsettings>     <add key="webpages:version" value="2.0.0.0"/>     <add key="webpages:enabled" value="false"/>     <add key="preserveloginurl" value="true"/>     <add key="clientvalidationenabled" value="true"/>     <add key="unobtrusivejavascriptenabled" value="true"/>   </appsettings>   <system.web>     <compilation debug="true" targetframework="4.0"/>      <httpruntime executiontimeout="110" maxrequestlength="500480"/>     <authentication mode="forms">       <forms loginurl="~/account/login" timeout="2880"/>     </authentication>     <pages controlrenderingcompatibilityversion="4.0">       <namespaces>         <add namespace="system.web.helpers"/>         <add namespace="system.web.mvc"/>         <add namespace="system.web.mvc.ajax"/>         <add namespace="system.web.mvc.html"/>         <add namespace="system.web.optimization"/>         <add namespace="system.web.routing"/>         <add namespace="system.web.webpages"/>       </namespaces>     </pages>   </system.web>   <system.webserver>     <validation validateintegratedmodeconfiguration="false"/>     <handlers>       <remove name="extensionlessurlhandler-isapi-4.0_32bit"/>       <remove name="extensionlessurlhandler-isapi-4.0_64bit"/>       <remove name="extensionlessurlhandler-integrated-4.0"/>       <add name="extensionlessurlhandler-isapi-4.0_32bit" path="*." verb="get,head,post,debug,put,delete,patch,options" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness32" responsebufferlimit="0"/>       <add name="extensionlessurlhandler-isapi-4.0_64bit" path="*." verb="get,head,post,debug,put,delete,patch,options" modules="isapimodule" scriptprocessor="%windir%\microsoft.net\framework64\v4.0.30319\aspnet_isapi.dll" precondition="classicmode,runtimeversionv4.0,bitness64" responsebufferlimit="0"/>       <add name="extensionlessurlhandler-integrated-4.0" path="*." verb="get,head,post,debug,put,delete,patch,options" type="system.web.handlers.transferrequesthandler" precondition="integratedmode,runtimeversionv4.0"/>     </handlers>   </system.webserver>   <runtime>     <httpruntime maxrequestlength="800768"/>     <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">       <dependentassembly>         <assemblyidentity name="system.web.helpers" publickeytoken="31bf3856ad364e35"/>         <bindingredirect oldversion="1.0.0.0-2.0.0.0" newversion="2.0.0.0"/>       </dependentassembly>       <dependentassembly>         <assemblyidentity name="system.web.mvc" publickeytoken="31bf3856ad364e35"/>         <bindingredirect oldversion="0.0.0.0-4.0.0.0" newversion="4.0.0.0"/>       </dependentassembly>       <dependentassembly>         <assemblyidentity name="system.web.webpages" publickeytoken="31bf3856ad364e35"/>         <bindingredirect oldversion="1.0.0.0-2.0.0.0" newversion="2.0.0.0"/>       </dependentassembly>     </assemblybinding>   </runtime>   <entityframework>     <defaultconnectionfactory type="system.data.entity.infrastructure.localdbconnectionfactory, entityframework">       <parameters>         <parameter value="v11.0"/>       </parameters>     </defaultconnectionfactory>   </entityframework> </configuration> 

how can fix problem? did configuration solution exists?

add in webconfig, increase maxrequestlength per requirment
<system.web> <httpruntime executiontimeout="110" maxrequestlength="20480"/> </system.web>


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -