Getting Exception when trying to upload a big files size

后端 未结 2 446
情深已故
情深已故 2021-01-06 22:52

I\'m using wshttpbinding for my service


            

        
相关标签:
2条回答
  • 2021-01-06 23:03

    The upload limit is set at 2 level, 1st by the Application and 2nd by the Server.

    Your app configuration looks good to me.

    Check your IIS settings as defined in your machine.config file. I found a Microsoft KB article to configure this

    You can configure the value at any of these places.

    0 讨论(0)
  • 2021-01-06 23:17

    There are (2) settings maxRequestLength and maxAllowedContentLength on the server side in your WCF confgiration that you are going to need to increase in order for this exception to be resolved. In the .config for the WCF service server side make sure to add the following:

    <system.web>
      <!--Increase 'maxRequestLength' to needed value: 100mb (value is in kilobytes)-->
      <httpRuntime maxRequestLength="102400"/>
    </system.web>
    
    <system.webServer>
      <security>
        <requestFiltering>
          <!--Increase 'maxAllowedContentLength' to needed value: 100mb (value is in bytes)-->
          <requestLimits maxAllowedContentLength="104857600" />
        </requestFiltering>
      </security>
    </system.webServer>
    
    0 讨论(0)
提交回复
热议问题