IConfiguration is internally registered as singleton/scoped/transient ? #55310
Unanswered
abhay-profile
asked this question in
Q&A
Replies: 1 comment
-
Even when a object is a singleton it's properties can be updated. The configuration objects isn't immutable / readable in that sense, and can be updated. That's the behavior you observe. See e.g. JSON configuration provider with it's Further have a look at Options pattern in ASP.NET Core to see the various possibilities of using monitored settings, etc. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have researched and found on articles IConfiguration is registered as singleton but when I change something in appsettings IConfiguration gives updated value without rebuilding application. So it has to be atleast scoped ? I am confused please anyone explain this behaviour.
Beta Was this translation helpful? Give feedback.
All reactions