In ASP.NET Core web application (.NET Framework) there is app.config
file which contains:
<configuration>
<runtime>
<gcServer enabled="true"/>
</runtime>
</configuration>
but this file is not available in ASP.NET Core web application (.NET Core) project. running GC
in server
mode is necessary for ASP.NET Core web application (.NET Framework) ?
App. Config is an XML file that is used as a configuration file for your application. In other words, you store inside it any setting that you may want to change without having to change code (and recompiling). It is often used to store connection strings.
Application configuration in ASP.NET Core is performed using one or more configuration providers. Configuration providers read configuration data from key-value pairs using a variety of configuration sources: Settings files, such as appsettings. json.
The web. config is a file that is read by IIS and the ASP.NET Core Module to configure an app hosted with IIS.
ASP.NET MVC configuration In ASP.NET apps, configuration uses the built-in . NET configuration files, web. config in the app folder and machine. config on the server.
There is an equivalent in the web app, you're looking for project.json
and it's runtimeOptions
. I detailed this a little in my migration guide, (look for runtimeOptions
).
The addition of the gsServer
is to tell the runtime
to perform garbage collection. The server in the context of the ASP.NET Core application is Kestrel. There are various details about this in the project.json
schema changes here. The documentation states this:
Enable server GC
Additionally, you should look at the following:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With