1

i needd to change

    </system.webServer>      
     <serverRuntime uploadReadAheadSize="128000000"/>
    </system.webServer>

if i do it in my webconfig i get 500.19 error as here Adding serverRuntime tag in webconfig cause 500.19 error so i need to allow this change as in that topic..

so question is is there a way to change this in webconfig and NOT NEED to change anything even this deny to allow in C:\Windows\System32\inetsrv\Config applicationHost.config ?

i was thinking that .net core even if hosted in iss and if i do [DisableRequestSizeLimit] in controller that shis will be done? is it the same settings? just not 'valid' for iss? only when hosted in Kestrel then it would work? is there a way to force iss to use Kestrels and use [DisableRequestSizeLimit] instead of this value from webconfig ?

thanks and regards

d00lar
  • 802
  • 7
  • 25
  • Through Configuration Editor of IIS, select following section system.webServer and expand it, then locate serverRuntime. You can clearly see that the uploadReadAheadSize value can only be modified in applicationhost.config and is locked in web.config. The 500.19 error can occur if the specified portion of the IIS configuration file is locked at a higher configuration level, it needs to unlock the specified section. – TengFeiXie May 19 '23 at 10:13
  • yes i known that but i wanted to deploy be as simple as just copy and paste and run without need to change anything in configuration editor ? so best would be if it could be hardcoded or in webconfig without need to unlock anything? – d00lar May 19 '23 at 10:39
  • OK, I know your means. This is also done by the IIS team for security reasons. Some parameters must be configured at a higher level. The most convenient way is to configure directly in the IIS configuration editor. – TengFeiXie May 22 '23 at 10:09
  • i see thx ;) but if i would run this as an exe without iis ? then DisableRequestSizeLimit takes care of it ? is it the same setting? – d00lar May 22 '23 at 11:04
  • This parameter can be set directly in IIS manager, I don't understand that run this as an exe without iis? [DisableRequestSizeLimit] is setting in asp.net core app. Usually if it is running behind IIS, then the limit is disabled, and the usual web.config limit applies. You can refer to this explain about the limit: https://stackoverflow.com/a/45927665/20058276. – TengFeiXie May 23 '23 at 10:00

0 Answers0