AZURE APP CONFIGURATION | Central Store For Application Configuration | ASP.NET Core Series

  Рет қаралды 23,393

Rahul Nath

Rahul Nath

Күн бұрын

Hey 👋, Azure App Configuration provides a service to centrally manage application settings and feature flags. Modern programs, especially programs running in a cloud, generally have many components that are distributed in nature. Spreading configuration settings across these components can lead to hard-to-troubleshoot errors during application deployment. Use App Configuration to store all the settings for your application and secure their access in one place.
In this video, I will show you how to create and set up Azure App Configuration and use that from an ASP NET Core application. I will also show you how to automatically refresh values from App Configuration to easily update configuration values without application restart. We will also explore the concept of Sentinel Keys to reduce the number of calls made to Azure App Configuration.
Introduction - 00:00
Azure Setup - 02:49
ASP NET Core Setup - 06:40
Automatic Refresh - 13:14
Sentinel Key - 21:28
Managed Identity - 27:04
🔗Source Code - rahulpnath.visualstudio.com/D...
Additional Watching
📹Dependency Injection - • DEPENDENCY INJECTION i...
📹Middleware - • MIDDLEWARE in ASP.NET ...
📹 Managed Identity - • Azure SDK DefaultAzure...
📹Using HttpClient - • How To Use HTTP CLIENT...
📹ASP NET Core Series - • ASP.NET Core
LInks
🔗 App Configuration - docs.microsoft.com/en-us/azur...
🔗 Managed Identity - docs.microsoft.com/en-us/azur...
🔗 Event Grid Integration - docs.microsoft.com/en-us/azur...
Come say hi! ✋
🌍 Blog - rahulpnath.com/
✉ Subscribe to my Newsletter - www.rahulpnath.com/subscribe
🐦Twitter - / rahulpnath
📸Instagram - / rahulpnath
🎥 Recording Setup and Workflow - www.rahulpnath.com/blog/youtu...
Make sure to SUBSCRIBE to the channel. THANK YOU for helping me grow this channel !!

Пікірлер: 94
@harshitshahi5856
@harshitshahi5856 2 жыл бұрын
With a great community not just the video tutorials but the comments also help a lot!
@RahulNath
@RahulNath 2 жыл бұрын
Glad they are Harshit!
@rajkumarreddy8795
@rajkumarreddy8795 3 жыл бұрын
Thanks Rahul for End-to-End demo, for work b/w Developer & Admin
@RahulNath
@RahulNath 3 жыл бұрын
Thank you and glad it helped Rajkumar!
@aruncherian6020
@aruncherian6020 3 жыл бұрын
Thank you for doing these high-quality tutorials...
@RahulNath
@RahulNath 3 жыл бұрын
Glad you like them Arun. Thank you!
@keerthang5557
@keerthang5557 3 жыл бұрын
Hats off to your dedication, making videos @ 4am in the morning , Keep going !!
@RahulNath
@RahulNath 3 жыл бұрын
Thank you so much 😀Yes all videos are recorded between 4 and 5. That's when the house is most silent.
@panirajn
@panirajn 3 жыл бұрын
I really like and appreciate your wonderful tutorials. Each one is a great source of new info to developers
@RahulNath
@RahulNath 3 жыл бұрын
Happy you like them Paniraj!
@sajidahmed2558
@sajidahmed2558 3 жыл бұрын
Thanks Rahul, Very clear explanation.
@RahulNath
@RahulNath 3 жыл бұрын
Thank you Sajid 😀
@user-bc8pi6yy1z
@user-bc8pi6yy1z 4 ай бұрын
Such a great teacher! Tehank you so much !
@RahulNath
@RahulNath 4 ай бұрын
So glad you like it Mario! Do let me know if you have any topic suggestions.
@Travellife8877
@Travellife8877 2 жыл бұрын
in-depth and to the point..even though I am a python developer but the process helped me a lot, thanks man
@RahulNath
@RahulNath 2 жыл бұрын
Glad to hear that Amit. Happy it helped.
@MyR555
@MyR555 6 ай бұрын
Really great video having very useful information..
@RahulNath
@RahulNath 6 ай бұрын
Glad it was helpful Ravindra! Do checkout out the ASP Series bit.ly/asp-net-core-series
@kayandersen2828
@kayandersen2828 Жыл бұрын
So great. Thanks
@RahulNath
@RahulNath Жыл бұрын
Thank you too Kay, Glad it helps!
@deivamanidhandabani9505
@deivamanidhandabani9505 2 жыл бұрын
Good explanation Rahul. Thank for your lessons
@RahulNath
@RahulNath Жыл бұрын
So nice of you, thank you!
@grimmersnee
@grimmersnee Жыл бұрын
great vid. got me up to speed fast
@RahulNath
@RahulNath Жыл бұрын
Good to hear! Do check out the Azure series bit.ly/azure-series
@hemchandu7813
@hemchandu7813 3 жыл бұрын
Hats off Rahul keep going
@RahulNath
@RahulNath 3 жыл бұрын
Thank you!! Do check out the full series on ASP NET Core here kzfaq.info/sun/PL59L9XrzUa-nqfCHIKazYMFRKapPNI4sP
@vivekkr2060
@vivekkr2060 Жыл бұрын
Hi Rahul, Really loved your videos for learning azure. Could you please add a video regarding the Azure Load balancer? Which Azure load balancer is well suited for the project etc.
@mayureshs80
@mayureshs80 3 жыл бұрын
Thank you !
@RahulNath
@RahulNath 3 жыл бұрын
Thank you Mayuresh!
@akashlondhe1110
@akashlondhe1110 3 жыл бұрын
Great 👍 plz make video on asynchronous programming using async and await in details and also include use of Task. We will be very thankful to you 🙏❤️
@RahulNath
@RahulNath 3 жыл бұрын
Thank you Akash and it is a great suggestion. I will definitely make one! Lots of concepts to be covered there I believe (time to start reading 😀)
@TomJerry-ow2ee
@TomJerry-ow2ee Жыл бұрын
Thanks a lottt.. ya
@RahulNath
@RahulNath Жыл бұрын
Thank you Tom 👍
@udityanshudubey333
@udityanshudubey333 3 ай бұрын
Hey rahul, can we add a list of values for some key in azure app configuration?
@prvs8
@prvs8 Жыл бұрын
thanks
@RahulNath
@RahulNath Жыл бұрын
You're welcome Parvesh!!
@AmrishVadali.
@AmrishVadali. Жыл бұрын
hi Rahul, great video I got good understanding on App config and I was able to implement this by seeing your video. but when accessing the same with in container I am seeing an exception like "Retry failed after 3 tries. Retry settings can be adjusted in ClientOptions.Retry. (The SSL connection could not be established, see inner exception.) (The SSL connection could not be established, see inner exception.) (The SSL connection could not be established, see inner exception.) "
@challaramarao9091
@challaramarao9091 2 жыл бұрын
Thanks Rahul, it's a wonderful tutorial. Is there any feasibility to read a section of config and bind it a custom model? let us say, I have a group of keys Section1:key1, Section1:key2 etc. I would need to bind this with a model Section1 wtih key1 and key2 as properties.
@RahulNath
@RahulNath 2 жыл бұрын
Thank you Challa. Yes you can use the configuration bind. I generally prefer using the Options Pattern in this case which is talk about here kzfaq.info/get/bejne/ic-qfaZ9yNDGf3U.html Also do checkout the entire ASP NET Series here (for other concepts) - bit.ly/asp-net-core-series Let me know if you have additional questions.
@venkatdwayne
@venkatdwayne 4 ай бұрын
Great Video Brother ! I need some help regarding this topic . Configurations are read correctly when the service starts . In my local .net core application my configuration are not getting refreshed even after cache expiration time has elapsed. InitializationCacheExpires is set to {1/1/0001 12:00:00 AM +00:00} . Thanks in advance.
@RAM-ff8dy
@RAM-ff8dy 3 жыл бұрын
Great video... Whats the difference between AZure keyvalut vs Azure App Configuration..Because i can see we will use both to store secrets and config values etc.
@RahulNath
@RahulNath 3 жыл бұрын
Thank you Ram and glad you like it. Yes it complements Key Vault functionality but simplifies many tasks especially around configuration. You can also integrate App Configuration to a Key Vault. More details on your question here docs.microsoft.com/en-us/azure/azure-app-configuration/faq#how-is-app-configuration-different-from-azure-key-vault Hope that helps. Do let me know if you have further question.
@suneelvanapalli
@suneelvanapalli 2 жыл бұрын
Thank you for the detailed tutorial. I have a similar implementation of automatic refresh with the azure function. For some reason app configuration updates aren't being picked up. Here is the code opts.ConfigureRefresh(refresh => { refresh .Register("Global:Sentinel", label: LabelFilter.Null, refreshAll: true) .SetCacheExpiration(new TimeSpan(0,0,5)); }); Updated the Global:Sentinel value and test config value var testConfig = _options.Value.Test; I am using nuget package Microsoft.Extensions.Configuration.AzureAppConfiguration 4.4.0
@RahulNath
@RahulNath 2 жыл бұрын
Did you come across this SO stackoverflow.com/questions/61181243/usage-of-azure-app-configurations-feature-flags-in-azure-functions
@RAM-ff8dy
@RAM-ff8dy 3 жыл бұрын
Great video... Rahul could you please make a video on Fluent Validations and Writing start up code into sepearate exrtension classes
@RahulNath
@RahulNath 3 жыл бұрын
Thank you Ram. Sure will add Fluent Validations to my list and definitely do one. Could you provide more details around the start up code into different classes? There is a video on Startup Classes in general kzfaq.info/get/bejne/r52Fp7Kfx7u5o5s.html (But guess that is not what you are looking for).
@RAM-ff8dy
@RAM-ff8dy 3 жыл бұрын
@@RahulNath Yes Rahul, instead of writing all of our code in the startup class, we can create the extension methods and write those logic into it and call the method in our start up class.
@alwaseem5309
@alwaseem5309 Жыл бұрын
Is this bahviour has been changed in net6. I have a similar configuration in my using the example from Microsoft docs. Along with your great video, the new value is not being refreshed. I had to get the refresh provider and add middleware to refresh each time there is a new http request.
@RahulNath
@RahulNath Жыл бұрын
Hey Al Waseem, Thank you and glad you liked it. When you say not being refreshed, can you provide more details around it? I do talk about AutmaticRefresh (13:14) and Sentinel keys (21:28) in this video.
@Jayanthsumanth
@Jayanthsumanth 3 жыл бұрын
1st view
@RahulNath
@RahulNath 3 жыл бұрын
First reply! 😀 Thank you
@krishnaks999
@krishnaks999 2 жыл бұрын
Can you please do a demo on reading excel content from Azure blob
@RahulNath
@RahulNath 2 жыл бұрын
What problem are you facing? My first question would be - does it need to be excel or can it be csv?
@rahulchaurasia5560
@rahulchaurasia5560 2 жыл бұрын
Hi Rahul, For pushing the config dynamically whenever there is a change in config(for one to many scenarios) which is better Event Grid or service bus? If event grid then suggest something, with service bus I had tried ,and got it worked.
@RahulNath
@RahulNath 2 жыл бұрын
The doc here mentions why you would use one over the other docs.microsoft.com/en-us/azure/azure-app-configuration/enable-dynamic-configuration-dotnet-core-push-refresh?WT.mc_id=AZ-MVP-5003875 _"Applications can choose to subscribe to these events either directly from Event Grid, or through a web hook, or by forwarding events to Azure Service Bus. The Azure Service Bus SDK provides an API to register a message handler that simplifies this process for applications that either do not have an HTTP endpoint or do not wish to poll the event grid for changes continuously."_ Does that help?
@rahulchaurasia5560
@rahulchaurasia5560 2 жыл бұрын
@@RahulNath Yes
@RahulNath
@RahulNath 2 жыл бұрын
@@rahulchaurasia5560 cool 😀
@musings2134
@musings2134 3 жыл бұрын
Could you do one video on how to create STS(Secure Token Service) . Central Authentication for microservices?
@RahulNath
@RahulNath 3 жыл бұрын
Thank you for the suggestion Arbaaz. Do you use any Central Identity Server for your microservices?
@musings2134
@musings2134 3 жыл бұрын
@@RahulNath Azure AD for our own organization. But clients could bring in their own identity provider. So on a high level - basically, there is a 1. Third party auth0 service, 2. A central microservice (STS) which issues token, 3. Application microservice which is MVC application. When MVC application starts it communicates with STS, STS talks to its database to get what parameter values are to be sent to 3rd party service(auth0) . Then the auth0 redirects user to the respective login screen. Once authenticated, STS gets intimated. STS generates token and sends it back to the MVC application.
@SagnikSaha94
@SagnikSaha94 3 жыл бұрын
Hello Rahul Please create some videos on Durable functions.
@RahulNath
@RahulNath 3 жыл бұрын
Done already added to my list 😀
@bandarubharathbharath
@bandarubharathbharath Жыл бұрын
Hi, How we can get ride/increase of azure request timeout 230 seconds?
@RahulNath
@RahulNath Жыл бұрын
Where are you seeing these timeouts?
@bewl2641
@bewl2641 2 жыл бұрын
Does the contents of your appsettings.{env}.json override the contents of App Config? If so, is there a way to make App Config take precedence over those files?
@RahulNath
@RahulNath 2 жыл бұрын
Yes it does . I talk about this around 7:30. The order in which the configuration providers are added determines which one overrides which. Why do you want appsettings to override the env specific ones ? Also checkout my video on Configuration to learn more on how it works kzfaq.info/get/bejne/a62cmquHxJeWXZ8.html
@bewl2641
@bewl2641 2 жыл бұрын
@@RahulNath The reason why I would maybe want the Azure App Config to override my appsettings files is because (in my case) our DevOps team would control the interactions with Azure App Config. As a developer, it would be nice to have a sort of 'template' within the appsettings files to see what is available to use (without knowing the values).
@RahulNath
@RahulNath 2 жыл бұрын
​@@bewl2641 Yes absolutely - I leave all configurable values in appsettings.json (either empty or default) and have them overridden in the environment-specific files. So for this use case, it's better to keep the same order as default with env overriding the values in appsettings. I talk about these in more detail here kzfaq.info/get/bejne/rbqDqJWSqNW2Z40.html Let me know if that answers your questions.
@sharath1857
@sharath1857 2 жыл бұрын
Is there anyway to access app configuration using managed identities from local itself
@RahulNath
@RahulNath 2 жыл бұрын
Yes I show this under the Managed Identities section. Also checkout this link here for more details www.rahulpnath.com/blog/azure-managed-service-identity-and-local-development/ Let me know if you have additional questions
@VinayKumar-qu1eg
@VinayKumar-qu1eg 3 жыл бұрын
Hi Rahul, as always one more great tutorial. We have 30+ applications/apis/functions with each pointing to the same database(connection string). If we setup one app Configuration for db read for all the apps with SetCacheExpiration as 1 sec.Then number of requests in one hour would be 30*60*60=108,000 requests with one instance only. And each api is loadbalanced(autoscaling), the instances count usually is between 2 to 6. So the number of requests increases further. What do you suggest here as even the Standard pricing model has limitation of 20,000 requests per hour?
@RahulNath
@RahulNath 3 жыл бұрын
Hey Vinay, Glad you liked the video. When changing connection string don't delete the old one immediately (very similar to having a primary and secondary key). If you keep the cache expiration to a larger value (let's say 30 minutes), during that time all the applications will gradually fall over to the new key. You can use queries on your backend then to verify that all connections have switched over to the new key and then retire the old one (after 30 minutes, if all automatic updates were successful). Let me know if that helps or if you have additional questions.
@VinayKumar-qu1eg
@VinayKumar-qu1eg 3 жыл бұрын
@@RahulNath Hi Rahul, thanks. Yes this idea helps. I will reach out to you if I need any help when I am going to implement this.
@RahulNath
@RahulNath 3 жыл бұрын
@@VinayKumar-qu1eg Do let me know!
@VinayKumar-qu1eg
@VinayKumar-qu1eg 2 жыл бұрын
@@RahulNath Hi Rahul, We have started using 'App Configuration' to store database connectionString and read it in all our apis. We store database connectionString in KeyVault and reference it in App Configuration using KeyVault reference way. 2 Observations 1) Once we update connectionString in KeyVault, api will not pick new version until we update 'App Configuration' (just need to re-reference the keyvault) - Is it by design ? 2) From the code, if we use Scoped/Transient service for the db connection, it works as expected for the updated connectionString. But if we make database connection service as Singleton, then even after updating the KeyVault's db connection with new version and re-reference it in app configuration, still it picks the old version since the db connection service is a Singleton - Is their any better and easy way to notifiy appService to re-initialize db service instace once there is a change in connection from KeyVault&/App Configuration ?
@RahulNath
@RahulNath 2 жыл бұрын
@@VinayKumar-qu1eg When integrating with Key Vault are you specifying a specific version or the latest version? I will try this out myself and let you know. When using Singleton instances it depends on how you are resolving the connection string value inside. If it's during construction time then I guess it's working as expected. You will need to add in additional code in the case you getting an unauthorized error to reinitialize your connection inside the singleton class. Is there a specific reason to keep it as Singleton?
@YanickGirouard
@YanickGirouard 2 жыл бұрын
Am I correct to assume that enabling automatically refreshed configuration values increase the number of requests the app will do to Azure App Configuration and therefore, increase the subscription costs greatly?
@RahulNath
@RahulNath 2 жыл бұрын
Yes you are correct Yanick - Which is why using a Sentinel key is suggested. I talk about it at 21:28. Hope that answers your question.
@YanickGirouard
@YanickGirouard 2 жыл бұрын
@@RahulNath yes, thank you. It's not always obvious how many requests any of these implementations would generate in order to estimate the cost, and it can go up quite fast if you're not careful... Very nice tutorial by the way, I loved it!
@RahulNath
@RahulNath 2 жыл бұрын
@@YanickGirouard Yes very true - if you are not careful and running on larger scale costs can go up if you are not careful. One reason why I made sure to cover the Sentinel key in the video. Glad you found it useful!
@CharuSharma3
@CharuSharma3 Жыл бұрын
Using azure app config, is there a way to create a feature flag/define a feature flag or update the audience of the feature flag in code?
@RahulNath
@RahulNath Жыл бұрын
Yes Charu , and I have a follow up video on that here kzfaq.info/get/bejne/p9qgbJN6vrO2mGw.html Let me know if that’s what you are looking for ?
@CharuSharma3
@CharuSharma3 Жыл бұрын
@@RahulNath Thanks for replying, the video you directed me to, creates feature flags (using azure app config) manually in the portal. I want to create the feature flag in azure app config via code. Is that something we can do?
@hemchandu7813
@hemchandu7813 3 жыл бұрын
Hi Rahul can you make a video how to configure Backend for react apps in Azure ?
@RahulNath
@RahulNath 3 жыл бұрын
Can you provide more details Hem on what exactly that you are looking for?
@hemchandu7813
@hemchandu7813 3 жыл бұрын
@@RahulNath I am working on React project and for backend we are using PHP YII2 frame work. So in react we need to configure Backend URL right. Can we configure that in CD part in Azure DevOps ?
@RahulNath
@RahulNath 3 жыл бұрын
@@hemchandu7813 Yes you can do that in Devops as part of Environment Variables. I have some videos on that. Check this playlist out here kzfaq.info/sun/PL59L9XrzUa-npmS1p7AIPOH7eZqzgMqV0 Check out the one around Environment Specific Variables in particular And this one kzfaq.info/get/bejne/hayiabmc3JbRoWw.html Let me know if you have any additional questions.
@hemchandu7813
@hemchandu7813 3 жыл бұрын
Thanks Rahul
@KunalMukherjee3701
@KunalMukherjee3701 2 жыл бұрын
How is it different from Azure Key Vault
@RahulNath
@RahulNath 2 жыл бұрын
They are complementary services. You can use Key Vault references from App Configuration. This SO post answers a bit more stackoverflow.com/questions/67722160/what-is-the-point-of-using-azure-key-vault-instead-of-only-app-configuration Let me know if that helps.
@RAM-ff8dy
@RAM-ff8dy 3 жыл бұрын
Plz make a video on Azure AppGateway..
@RahulNath
@RahulNath 3 жыл бұрын
Thank you Ram for the suggestion. Added to my list. Any specific things you want to be covered about App Gateway?
@RAM-ff8dy
@RAM-ff8dy 3 жыл бұрын
@@RahulNath If we create a service then we will have the service URL, Lets say if we have the swagger link for that service then anyone can access, so for the customer faced URL's we can secure that service URL using the app gateway right and also if we want to pass the customerId parameterid in the query param then its not a good idea so we can send it using the JWT token.. 1) Create a Web api endpoint with asp net core which also have the customer info properties needs to pass in the querystring/body. 2) secure the service URL with app gateway which have the subscripion key so that only the services which want to consume needs to pass that subscription key 3) instead of passing the important customer details in the header/queryparams we can send it using JWT.
Vivaan  Tanya once again pranked Papa 🤣😇🤣
00:10
seema lamba
Рет қаралды 31 МЛН
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 73 М.
What Is .NET Aspire? The Insane Future of .NET!
18:35
Nick Chapsas
Рет қаралды 262 М.
Getting started with Azure App Configuration | Azure Friday
14:42
Microsoft Developer
Рет қаралды 24 М.
Azure App Service in 15 MINUTES | Web App Tutorial
16:23
Code with Julian
Рет қаралды 43 М.
Azure Application Insights Tutorial | Amazing telemetry service
34:26
Adam Marczak - Azure for Everyone
Рет қаралды 235 М.
It changes everything #knot #rope #bushcraft #camping #survival
0:11
ToRung short film: 🙏give away free meals🤗
0:47
ToRung
Рет қаралды 2,4 МЛН
iPhone 16 с инновационным аккумулятором
0:45
ÉЖИ АКСЁНОВ
Рет қаралды 4,6 МЛН
good-natured puppy #viral #trending #dog
0:27
Kẹo cute
Рет қаралды 8 МЛН
berenang lagi #viral #shorts
0:12
Kakek Endo Family
Рет қаралды 32 МЛН