Live Chat Icon For mobile
Live Chat Icon

How do I access the appsettings in Blazor WebAssembly?

Platform: Blazor| Category: General

Configurations loaded by the Blazor WebAssembly can be accessed by injecting IConfiguration services. Using IConfiguration, the values from wwwroot/appsettings.json and wwwroot/appsettings.{ENVIRONMENT}.json files can be accessed.


  "message":  "Blazor is awesome."   


@inject Microsoft.Extensions.Configuration.IConfiguration config

More information about configuration can be found here.

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.