CONFIGURATION in ASP.NET Core | Getting Started With ASP.NET Core Series

  Рет қаралды 29,387

Rahul Nath

Rahul Nath

3 жыл бұрын

Hey Friends, The .NET Framework, through configuration files, gives developers and administrators control and flexibility over the way applications run. Developers can put settings in configuration files, eliminating the need to recompile an application every time a setting changes. Configuration in ASP NET is performed using one or more configuration providers. Configuration providers read configuration data from key-values using a variety of config sources.
In this video, let's take a deep dive into how to configure values in ASP NET Core, read it in your application, how the default configuration providers are set up and how to write customer configuration providers.
🔗Configuration in ASP NET Core - docs.microsoft.com/en-us/aspn...
Additional Watching
📹Dependency Injection in ASP NET Core - • DEPENDENCY INJECTION i...
📹Middleware in ASP NET Core - • MIDDLEWARE in ASP.NET ...
📹Key Vault as Configuration Source - • Connect .Net Core to A...
📹ASP NET Core Series - • ASP.NET Core
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 !!

Пікірлер: 114
@RahulNath
@RahulNath 3 жыл бұрын
Source Code - rahulpnath.visualstudio.com/DefaultCollection/KZbin%20Samples/_git/configuration
@starman9000
@starman9000 3 жыл бұрын
No one covered Configuration is such a detail with example in you tube! your videos will be my first reference point when it comes to these topics before Microsoft releases new version! i can't stop appreciate your content and your method of teaching! Salute!👏👏👏
@RahulNath
@RahulNath 3 жыл бұрын
Thanks again . I am extremely happy that you are finding these content useful 😀
@efearslan7398
@efearslan7398 Жыл бұрын
OMG your way of explaining things is so clear and structured! Your way of presenting is a bit mechanic but you are surely a MASTER of teaching!
@williy_cole
@williy_cole 2 жыл бұрын
Your approach in these videos is probably the most straight forward/to the point explanations I have yet to see. Definitely getting a sub, extremely good content. Helped me get up to speed on a few things new to me at a new job. I would love to see you build a simple Crud Api, tie it into a db maybe Mongo, then build a Spa with react that uses that Api, maybe tie in docker then deploy Azure. That be a good "Here's pretty much all the things you need to know" video for folks new to C#.Net. Thanks for the Awesome content!
@RahulNath
@RahulNath 2 жыл бұрын
Great suggestion - I will add that to the list. Hope you are enjoying the full series bit.ly/asp-net-core-series
@ppcuser100
@ppcuser100 2 жыл бұрын
Beautiful lecture, so clear and so comprensive 🙏 Kept you in my favorites.
@RahulNath
@RahulNath 2 жыл бұрын
Yay, thank you and happy you like it! Do check out the full series here bit.ly/asp-net-core-series
@garethhodgson9403
@garethhodgson9403 2 жыл бұрын
All your videos are amazing! Has to be the best channel for .net devs.
@RahulNath
@RahulNath 2 жыл бұрын
Glad you think so Gareth! 😀
@hritikagarwal7676
@hritikagarwal7676 3 жыл бұрын
Very well explained. Helped me a lot. Thanks for the content.
@RahulNath
@RahulNath 3 жыл бұрын
Glad it helped Hritik. Do check out my other videos in the series, where I explain each of the ASP NET Building blocks in detail kzbin.info/aero/PL59L9XrzUa-nqfCHIKazYMFRKapPNI4sP.
@empathetic24671
@empathetic24671 Жыл бұрын
Thanks for the video
@coolnavjot31
@coolnavjot31 Жыл бұрын
Nice Explained Rahul. Thank you
@RahulNath
@RahulNath Жыл бұрын
Thanks and welcome!
@RAM-ff8dy
@RAM-ff8dy 3 жыл бұрын
Excellent video..looking forward for more Asp net core videos
@RahulNath
@RahulNath 3 жыл бұрын
Sure 👍
@prabodhafonseka6287
@prabodhafonseka6287 10 ай бұрын
Your videos are very interesting and explains topics very clearly. Thanks a lot. Keep up the good work!!!
@RahulNath
@RahulNath 10 ай бұрын
Thanks, will do! Happy to hear that Prabodha
@daryoes
@daryoes 3 жыл бұрын
Great job, thank you!
@RahulNath
@RahulNath 3 жыл бұрын
Thank you too!
@rajeshselvam564
@rajeshselvam564 3 жыл бұрын
You are giving such a wonderful explanation in each topic. I have seen many videos in dotnet core but your videos is my first preference after seen your videos first time...pls do more videos it would definitely help lot of folks like me...
@RahulNath
@RahulNath 3 жыл бұрын
Thank you Rajesh for letting me know. I am happy that these are helping you. Do let know if you want any specific topics covered!
@md.ajijulhoque2190
@md.ajijulhoque2190 3 жыл бұрын
Very informative 👍
@RahulNath
@RahulNath 3 жыл бұрын
Happy it helped 😀👍
@arminsh7068
@arminsh7068 3 жыл бұрын
Nice one, please Continue..
@RahulNath
@RahulNath 3 жыл бұрын
Sure will. Let know if you are looking for any particular topics.
@niroshanmanoharan4295
@niroshanmanoharan4295 3 жыл бұрын
Another great video. Your teaching skill is awesome. Thank you Rahul.
@RahulNath
@RahulNath 3 жыл бұрын
Thanks again 😀 I should give credit to my mom who is a teacher
@niroshanmanoharan4295
@niroshanmanoharan4295 3 жыл бұрын
I can notice the smiles and "ha ha" in your comments. But when it coming to teaching I am so strict. 😀😀😀. Convey my Thanks to your loving amma.
@RahulNath
@RahulNath 3 жыл бұрын
@@niroshanmanoharan4295 Haha yes, Still trying to work out being more relaxed with the camera on. Sure will do 😀
@sreescorner
@sreescorner 9 ай бұрын
Thank you so much for this video, it is very clear
@RahulNath
@RahulNath 8 ай бұрын
Glad to hear that! Do check out the full series bit.ly/asp-net-core-series
@juhairahamed5342
@juhairahamed5342 2 жыл бұрын
Good Explanation
@RahulNath
@RahulNath 2 жыл бұрын
Thanks and welcome. Do checkout the full series here bit.ly/asp-net-core-series
@schweppesmandarin8839
@schweppesmandarin8839 2 жыл бұрын
amazing tutorial! really clearly explained
@RahulNath
@RahulNath 2 жыл бұрын
Glad it was helpful! Do check out the full series here bit.ly/asp-net-core-series I am sure you will like it!
@schweppesmandarin8839
@schweppesmandarin8839 2 жыл бұрын
@@RahulNath Thank you very much, I am struggling with an implementation in my project. Do you have knowledge on thread safety and ConcurrentDictionary class ?
@RahulNath
@RahulNath 2 жыл бұрын
@@schweppesmandarin8839 Sure yes - might need some more details of the problem to help you. Contact details are on the about page, if it's something that does not fit in a comment.
@tonyburg
@tonyburg Жыл бұрын
wow, this was definitely better than reading Microsoft documentation, thanks!
@RahulNath
@RahulNath Жыл бұрын
Glad you liked it! Do check out the full series bit.ly/asp-net-core-series
@shivaganga9148
@shivaganga9148 8 ай бұрын
well explained bro
@RahulNath
@RahulNath 8 ай бұрын
Thank you 🙂Hope you like the full series bit.ly/asp-net-core-series
@edadson
@edadson 2 ай бұрын
Good job!
@RahulNath
@RahulNath 2 ай бұрын
Thanks! Hope you are liking the series bit.ly/asp-net-core-series
@juniorzucareli
@juniorzucareli 2 жыл бұрын
you're a beast, great video!
@RahulNath
@RahulNath 2 жыл бұрын
Thank you! Hope you are enjoying the full series bit.ly/asp-net-core-series
@jesusmendoza6536
@jesusmendoza6536 Жыл бұрын
Best of all time!
@RahulNath
@RahulNath Жыл бұрын
Thank you Jesus! You might also like this which covers different options when building an app www.rahulpnath.com/blog/handling-application-configuration/
@bdd740
@bdd740 2 жыл бұрын
Thanks a lot for great content.
@RahulNath
@RahulNath 2 жыл бұрын
Glad you liked it! Do check out the full series here bit.ly/asp-net-core-series
@bdd740
@bdd740 2 жыл бұрын
​@@RahulNath​I am doing it right now. Thanks a lot.
@RahulNath
@RahulNath 2 жыл бұрын
@@bdd740 Do let me know your feedback and suggestions 👍
@nazarinebeats5521
@nazarinebeats5521 Жыл бұрын
This is high value, I would buy a course from you!
@RahulNath
@RahulNath Жыл бұрын
Thank you Nazarine. My only course right now is on AWS Lambda bit.ly/aws-lambda-udemy What else would you like to see?
@dhanrajpairaiturkar1240
@dhanrajpairaiturkar1240 Жыл бұрын
Hi @RahulNath. Great job with the high quality content. Your .NET videos are the best. However it would be nice if you could make the same videos that you have in this series for .NET 6.0. I understood the .NET 3.1 configuration. But stillconfused on .NET 6.0, as there is no startup class there. Thanks and appreciate the hard work!
@RahulNath
@RahulNath Жыл бұрын
Glad you like these videos and the series bit.ly/asp-net-core-series I will do a follow up video, but nothing much has changed that actually. It's only that the Startup.cs is now moved into the Program.cs. All the other functionality still holds the same. Are you facing any issues with any of the code?
@becomingweleteeyesus6735
@becomingweleteeyesus6735 2 жыл бұрын
Great tutorial. Thanks. How did you get the definition of the methods by pressing F12? I only get the interfaces not the method definitions.
@RahulNath
@RahulNath 2 жыл бұрын
Thank you Seble. That’s a feature in Rider IDE and one of the reasons I use that for these videos . Easier to explain 😀
@ganirban82
@ganirban82 3 жыл бұрын
Thank you for super vid lesson. You have shown in-memory implementation at last. Actually any cloud native or modernization app should not use sticky session storage at application level so, Can we use above in-memory implementation for (for small data pushing and retrieving) pushing data at one action method of a controller and then retrieving that data another action method of an another controller(replacement of session storage)? Many Thanks,
@RahulNath
@RahulNath 3 жыл бұрын
Thank you. What kind of data are you intending to store in memory? If it's something you need even after an app restart, then no.
@ganirban82
@ganirban82 3 жыл бұрын
@@RahulNath , thank you for replay. Then what is replacement of sticky session storage at application level(server memory management) with .NET-Core-Web Many Thanks,
@anfield6321
@anfield6321 Жыл бұрын
MAKING VIDEOS AT 4 IN THE MORNING, COOOOOOOOOL
@RahulNath
@RahulNath Жыл бұрын
Haha, that's when the house is the quietest. All my videos are recorded during that time.
@koolmint-wf4lh
@koolmint-wf4lh Жыл бұрын
I am still confused one thing : how to publish my project, in VS2022 using Web Deploy, to my production environment, and the SQL server connection string will be switched to production db after the publish? can you please help? thanks
@partisanemo2079
@partisanemo2079 2 жыл бұрын
Awesome! I wonder if all this is applicable and pertinent to Blazor WebAssembly non-ASP.NET hosted.
@RahulNath
@RahulNath 2 жыл бұрын
Not sure - haven't been doing any Blazor. Do let me know if you were able to!
@yogeshbondi7321
@yogeshbondi7321 2 жыл бұрын
Hi Rahul, How do we setup in other editors to see the source code. Do you already have a video explaining that ? and also the way to see the source code in Git source too.
@RahulNath
@RahulNath 2 жыл бұрын
Rider automatically does that for me - which is mostly why I used that IDE to show these demo's. I haven't set that up in Visual Studio and not sure if it's possible. (maybe things have changed with VS2022, need to check)
@clashclan4739
@clashclan4739 2 жыл бұрын
Hi Bro, From where/which source you got this in-depth knowledge. so impressive!!!!!!!!!!!!!!!!
@RahulNath
@RahulNath 2 жыл бұрын
Thank you a lot and glad you are liking the videos. It's mostly been reading around the Microsoft documentation.
@yusongliew3680
@yusongliew3680 2 жыл бұрын
Hi, I wanna to ask about this config. Let's say, I already publish this project into my local PC folder. My setting file have included the database IP, but maybe I want change the setting file IP in the future. When I running the project, the setting still based on the previous IP instead of new IP. How can I solve this issues?
@RahulNath
@RahulNath 2 жыл бұрын
You can update it in the appsettings.json and it will automatically pick it up, since it is configured to reload on file change. If you are deploying to a Cloud Environment you can use Azure App Configuration to dynamically change configuration values kzbin.info/www/bejne/jHbNiopnabx-iK8 Let me know if that answers your question.
@rajendrank9582
@rajendrank9582 3 жыл бұрын
Is there any way we can reload the configuration without going to appsetting.json. for example, logging is set to warning in appsettings.json and I want to change to trace for some time like I need verbose for some reason. Can I achieve this without modifying the appsettings.json?
@RahulNath
@RahulNath 3 жыл бұрын
How do you intend to achieve this? What would trigger the change, would it be an endpoint in the application or some event within the application code, without manual intervention? This Github issue talks about something similar and has some inputs github.com/dotnet/AspNetCore.Docs/issues/15698 Let know if that helps.
@rajendrank9582
@rajendrank9582 3 жыл бұрын
@@RahulNath Trigger can be an endpoint response value, and using an IHostedService I can keep polling to this endpoint and the moment value returned as 'Verbose' for example I need to set the entire logging level to 'Trace', ya definitely without manual intervention. Currently what I did was setting values in appsettign.json to the desired value through reading and writing the json file. So I looking for a alternative.
@atmanirbharbharat
@atmanirbharbharat 3 жыл бұрын
i am creating Multi tenant application .in that every tenant have different database. i want to set database connection string in memory for each tenet. and if i update connection string in database it will aslo update in memory. please help me. but i dont want to use entity framework
@RahulNath
@RahulNath 3 жыл бұрын
Not sure if I understand your question fully. Where do you want to save your configuration? Is it in the configuration file or in a 'master database' (not specific to tenant)? You can write a custom configuration source like shown here code-maze.com/aspnet-configuration-creating-custom-provider/, if it is in a database that you want to store it and refresh it. Alternatively you can keep the connection strings in a centralized vault like Key Vault and fetch it from there and keep it in you app memory and autoamtically refresh it. Check out this video. kzbin.info/www/bejne/bJ3CnKOvnLRjf8U Let know if that helps or if you have additional questions.
@asldev
@asldev Жыл бұрын
💣💣💣
@RahulNath
@RahulNath Жыл бұрын
🚀🚀🚀 bit.ly/asp-net-core-series
@barwalgayatri4655
@barwalgayatri4655 2 жыл бұрын
Please please Please Make video 1) How to handle Huge Record Output if Records if records are of of thousands of rows 2) RabbitMQ for async Comm between Microservices . will you ??
@RahulNath
@RahulNath 2 жыл бұрын
Thank you for the suggestion Barwal. 1. What are you looking to do after reading 1000's of records? Please provide more details on your scenario 2. Don't think I'll do one specific to RabbitMQ. I have done one recently using Azure Queue Storage here kzbin.info/www/bejne/a6C3iWmpp7aXhac What in particular are you looking for here?
@barwalgayatri4655
@barwalgayatri4655 2 жыл бұрын
@@RahulNath Recently in Interviews , they keep on asking How will you Handle HttpResponse if the O/p Records are too large in Number. Also in one company , They Gave me assignment which was to Create API To Display COVID patient , Count , Death ,, COuntrywise , How to handle this if Records are in very large in number . I was not able to answer / Code this when they ask what to do if records are more than 1000....
@RahulNath
@RahulNath 2 жыл бұрын
@@barwalgayatri4655 If all this data needs to be exposed on an API endpoint, you will need to paginate, so that you retrieve the data page-by-page. Each page will have only limited data and the API will also query only data for that page. Does that help?
@devaliero-3d597
@devaliero-3d597 2 жыл бұрын
But is it possible to write to configuration using some build-in net core options?
@RahulNath
@RahulNath 2 жыл бұрын
Sorry didn't understand the question - Can you elaborate what you are trying to achieve?
@devaliero-3d597
@devaliero-3d597 2 жыл бұрын
@@RahulNath Thanks for response, Nath. I meant if is it possible to have write access. But it is not, we can have only read access using IConfiguration.
@uchitesting
@uchitesting 2 жыл бұрын
Hi. I do that now that we have .NET 6. There are differences in both how to code and results. There is no more Startup.cs and its content got moved to Program.cs. There is no more Configure or ConfigureServices methods. There is no IConfiguration injected in the constructor neither. So I did search a bit to check how to do. Both builder and app identifiers have a Configuration property. Console.WriteLine($"MyKey from builder => {builder.Configuration["MyKey"]}"); Console.WriteLine($"MyKey from app => {app.Configuration["MyKey"]}");
@uchitesting
@uchitesting 2 жыл бұрын
Thanks for the video. It was awesome.
@RahulNath
@RahulNath Жыл бұрын
Sory missed replying to this - Hope you were able to get everyting working. I might do a follow up on .NET 6. Most concepts remain the same, mostly moved places
@uchitesting
@uchitesting Жыл бұрын
@@RahulNath Maybe you could better do your series on LTS versions for longer value, but there are still people working on .NET Framework or older versions of .NET Core. But no problem Rahul. Your videos are helpful and still relevant. I often take courses from other people that are outdated but also still relevant. It needs a bit of digging but perfectly reachable. I just wanted to let anyone know should they start today. I also have the sources on my GitHub but I won't provide a link for it seems comments with one tends to be deleted. I'll keep on learning from you. Cheers. 💯
@RahulNath
@RahulNath Жыл бұрын
​@@uchitesting Great to hear that - Yes focusing on LTS versions sounds a good idea, otherwise things keep changing too fast to catch up with videos 😀 Yeah youtube does auto delete comments, I guess it is now becoming better at identifying valid links - Worth giving it a try and Thank you!!
@mohsinbhat3895
@mohsinbhat3895 2 жыл бұрын
please give videos on web apis
@RahulNath
@RahulNath 2 жыл бұрын
What videos are you looking for ? Here’s the full ASP Series kzbin.info/aero/PL59L9XrzUa-nqfCHIKazYMFRKapPNI4sP
@jesusmendoza6536
@jesusmendoza6536 Жыл бұрын
Hello, do you have a .NET course ? On Udemy o something like that.?
@RahulNath
@RahulNath Жыл бұрын
Not at the moment Jesus. I only have one Udemy course on Lambda bit.ly/aws-lambda-udemy What would you like to see in a .NET course? The full ASP Series is here bit.ly/asp-net-core-series
@jesusmendoza6536
@jesusmendoza6536 Жыл бұрын
Yup, to be honest at that time I didn’t see, but yeah. I see, absolutely one of bests. 👏
@RahulNath
@RahulNath Жыл бұрын
@@jesusmendoza6536 Thank you Jesus!!
@lakshanmadubashika3248
@lakshanmadubashika3248 2 жыл бұрын
could you make a new vedio for dotnet 6 configuration
@RahulNath
@RahulNath 2 жыл бұрын
Sure I've been planning to so some new .NET 6 videos. Will do it as part of it!
@lakshanmadubashika3248
@lakshanmadubashika3248 2 жыл бұрын
@@RahulNath Thank you
@prateekbhardwaj9943
@prateekbhardwaj9943 3 ай бұрын
u can improve videos if u improve emotions, and some voice modulation..plain expression and body language is less engaging
@rrcoura
@rrcoura 3 жыл бұрын
Good video, but you can lower the size of your face showing, and please, be more unformal.
@RahulNath
@RahulNath 3 жыл бұрын
Glad you liked the video and thank you for the feedback! Yes the size of my face was way too big in this one. I fixed it in my recent videos. Do let know your thoughts if you get a chance to watch one of them. And about unformal, yes I am working on it. The moment I switch on the camera, the serious face jumps out. 😀
@rrcoura
@rrcoura 3 жыл бұрын
Another question, is there a way to get a License of Rider the IDE you are using?
@RahulNath
@RahulNath 3 жыл бұрын
​@@rrcoura I have a license as part of the MVP programme. You can buy a license here (and there are some offers too, if you fall into any of that) www.jetbrains.com/rider/buy/#personal?billing=yearly. Alternatively, you can also try their Early access program for free (if you want to trial it) www.jetbrains.com/rider/nextversion/ Hope that helps
@juhairahamed5342
@juhairahamed5342 Жыл бұрын
Good Explanation
@RahulNath
@RahulNath Жыл бұрын
Thanks for liking. The full series is here bit.ly/asp-net-core-series
@barwalgayatri4655
@barwalgayatri4655 2 жыл бұрын
Please please Please Make video 1) How to handle Huge Record Output if Records if records are of of thousands of rows 2) RabbitMQ for async Comm between Microservices . will you ??
@RahulNath
@RahulNath 2 жыл бұрын
Replied here kzbin.info/www/bejne/a3jPmHuMlJZlY80&lc=Ugx8OJ4UpefrHYUjAFJ4AaABAg.9SzdyYZMm-W9SznHUZp5Bk (Next time please avoid copy pasting comment, as I've to copy paste replies too 😀)
Conforto para a barriga de grávida 🤔💡
00:10
Polar em português
Рет қаралды 90 МЛН
Маленькая и средняя фанта
00:56
Multi DO Smile Russian
Рет қаралды 3,8 МЛН
ASP NET Core appsettings json file
11:33
kudvenkat
Рет қаралды 327 М.
Cancellation Token in .NET | Exploring C# and DOTNET
18:42
Rahul Nath
Рет қаралды 3,6 М.
Coding Shorts: ASP.NET Core Middleware Explained
17:36
Shawn Wildermuth
Рет қаралды 26 М.
Разница между ездой сидя и стоя #эндуро #питбайк
0:17
Мотопехота Благовещенск
Рет қаралды 8 МЛН
DEFENDENDO O AMIGO
0:10
Stefani Belotti
Рет қаралды 4,7 МЛН
La final estuvo difícil
0:34
Juan De Dios Pantoja
Рет қаралды 9 МЛН
Новый Способ Замены Шин
0:15
nare304ka
Рет қаралды 2,5 МЛН