When ASP.NET uploads a file exceeding 3M through Base64String, the "remote server returned an error: (500) internal server error.", the solution appears

My development environment is vs2017 mvc5 


problem:

When ASP.NET uploads a file exceeding 3M through Base64String, the "remote server returned an error: (500) internal server error.", the solution appears


The remote server returned an error: (500) Internal server error.


My solution is to configure in web.config:



    <system.webServer> added

 <security>  
      <requestFiltering>
        <requestLimits maxAllowedContentLength="300000000" />          -----300000000为30M
      </requestFiltering>
    </security>


<system.web> added

    <httpRuntime targetFramework="4.5" maxRequestLength="30000000" />-----300000000为30M


Guess you like

Origin blog.csdn.net/qq_16005627/article/details/74209189