1

I need to set uploadReadAheadSize attribute of serverRuntime element in ASP.NET Core web.config, but after launching, it throws a HTTP Error 500.19 with the message

This configuration section cannot be used at this path

I found here, that I just need to set overrideModeDefault to "Allow" for ServerRuntime in {ProjectDirectory}.vs\\config\\applicationhost.config path. And that's exactly the problem, because everyone on the team has to change this setting locally the first time they run the application.

We could also add an applicationhost file in .gitignore, but we would like to avoid this.

Are there any options so that I don't have to change applicationhost.config every time I start the project for the first time? My goal is to make the first launch of an application a little easier for developers.

Steps to reproduce:

  1. Create new ASP.NET Core Web API
  2. Create Web.Config with:
<configuration>
    <system.webServer>
        <serverRuntime uploadReadAheadSize="1000000" />
    </system.webServer>
</configuration>
  1. Run app using IISExpress
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
BlueBanana
  • 11
  • 1
  • Based on my searching and testing, this doesn't seem to be possible, and also when running the app for the first time. – samwu Mar 29 '23 at 06:14
  • Take a look at [Here](https://stackoverflow.com/questions/22230458/setting-uploadreadaheadsize-in-iis-8-5). – Ali reza Soleimani Asl Mar 29 '23 at 18:03
  • That's a thing you feel like a problem, but Microsoft considers a feature (to harden the system and prevent security risks). Thus, the answer is simply no other options like you found. – Lex Li Apr 25 '23 at 03:01

0 Answers0