How to get appSettings value in web.config on framework net core 8


Dear All

How to get value from appSetings (“program.servername”) in web.config using net core 8.

<add key=”Wisej.LicenseKey” value=””/>
<add key=”Wisej.DefaultTheme” value=”Bootstrap-4″/>
<add key=”program.servername” value=”localhost”/>

in Framework 4.x,its return value=”localhost” using code

string value = System.Configuration.ConfigurationManager.AppSettings[“program.servername”];


but if using net core 8, return value=”null” using the same code. (program didn’t find the configuration key, i had try to copy file web.config to folder \bin\Debug\net8.0, the result is same).



  • You must to post comments

Finally i got the answer.

  1. Download System.Configuration.ConfigurationManager  for net core 8 in Nuget
  2. Add file web configuration file, rename it app.config
  3. Add key dan value that you want
  4. <appSettings><add key=”program.servername” value=”localhost”/></appSettings></configuration>

base on this link


  • You must to post comments

This isn’t a Wisej specific issue- .NET Core doesn’t support web.config.
Wisej.NET reads its own settings using the ConfigurationManager class.
Configuration Manager documentation:

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.