ASP.NET通过Base64String上传超过3M的文件时,出现“远程服务器返回错误: (500) 内部服务器错误。“,的解决方法

我的开发环境是vs2017  mvc5 


问题:

ASP.NET通过Base64String上传超过3M的文件时,出现“远程服务器返回错误: (500) 内部服务器错误。“,的解决方法


远程服务器返回错误: (500) 内部服务器错误。


我的解决办法是在web.config作配置:



    <system.webServer>里面增加

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


<system.web>里面增加

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


猜你喜欢

转载自blog.csdn.net/qq_16005627/article/details/74209189
今日推荐