0

I can not upload large files. My page is base in ASP.NET.

In IIS I have 2 sites;

-1 for web service
-1 for web page

I try many ways that I found, but no work

Web service config; ////////////////////////////

<?xml version="1.0" encoding="UTF-8"?>

<configuration>
  <appSettings>
...
  </appSettings>
  <connectionStrings>
...
  </connectionStrings>
  <system.web>
<httpRuntime maxRequestLength="50097151" />
    <compilation debug="true" targetFramework="4.5.2" />
    <authentication mode="Windows" />
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID" />
  </system.web>
</configuration>

//////////////////////////// ////////////////////////////

Web page config;

<?xml version="1.0" encoding="utf-8"?>
<configuration>


  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath=".\....exe" arguments="" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="true">
      <environmentVariables />
    </aspNetCore>
        <security>
            <requestFiltering>
                <requestLimits maxAllowedContentLength="50741824" />
            </requestFiltering>
        </security>
  </system.webServer>
</configuration>

I expect upload large files, but the actual is that I only can upload small files.

1 Answers1

0
    [HttpPost]
    [DisableRequestSizeLimit]
    public ActionResult uplo(string filename, string base64)
    {


        if (base64 != null && filename != null)
        {
            Models.filemodel archmod = new Models.filemodel ();
            var xxx= archmod .namefunction(filename, base64);
            return new EmptyResult();
        }


        return new EmptyResult();
    }

It works with [DisableRequestSizeLimit] tag !!!