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

Sdílet
Vložit
  • čas přidán 11. 08. 2020
  • 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 !!
  • Jak na to + styl

Komentáře • 114

  • @RahulNath
    @RahulNath  Před 3 lety +10

    Source Code - rahulpnath.visualstudio.com/DefaultCollection/CZcams%20Samples/_git/configuration

  • @starman9000
    @starman9000 Před 3 lety +23

    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  Před 3 lety +2

      Thanks again . I am extremely happy that you are finding these content useful 😀

  • @williy_cole
    @williy_cole Před 2 lety +5

    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  Před 2 lety

      Great suggestion - I will add that to the list. Hope you are enjoying the full series bit.ly/asp-net-core-series

  • @empathetic24671
    @empathetic24671 Před rokem

    Thanks for the video

  • @daryoes
    @daryoes Před 3 lety +2

    Great job, thank you!

  • @efearslan7398
    @efearslan7398 Před rokem

    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!

  • @sreescorner
    @sreescorner Před 8 měsíci

    Thank you so much for this video, it is very clear

    • @RahulNath
      @RahulNath  Před 8 měsíci +1

      Glad to hear that! Do check out the full series bit.ly/asp-net-core-series

  • @garethhodgson9403
    @garethhodgson9403 Před 2 lety +1

    All your videos are amazing! Has to be the best channel for .net devs.

    • @RahulNath
      @RahulNath  Před 2 lety

      Glad you think so Gareth! 😀

  • @ppcuser100
    @ppcuser100 Před 2 lety +1

    Beautiful lecture, so clear and so comprensive 🙏 Kept you in my favorites.

    • @RahulNath
      @RahulNath  Před 2 lety

      Yay, thank you and happy you like it! Do check out the full series here bit.ly/asp-net-core-series

  • @coolnavjot31
    @coolnavjot31 Před rokem +1

    Nice Explained Rahul. Thank you

  • @hritikagarwal7676
    @hritikagarwal7676 Před 3 lety +2

    Very well explained. Helped me a lot. Thanks for the content.

    • @RahulNath
      @RahulNath  Před 3 lety

      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 czcams.com/play/PL59L9XrzUa-nqfCHIKazYMFRKapPNI4sP.html.

  • @shivaganga9148
    @shivaganga9148 Před 8 měsíci

    well explained bro

    • @RahulNath
      @RahulNath  Před 8 měsíci

      Thank you 🙂Hope you like the full series bit.ly/asp-net-core-series

  • @RAM-ff8dy
    @RAM-ff8dy Před 3 lety +1

    Excellent video..looking forward for more Asp net core videos

  • @prabodhafonseka6287
    @prabodhafonseka6287 Před 10 měsíci

    Your videos are very interesting and explains topics very clearly. Thanks a lot. Keep up the good work!!!

    • @RahulNath
      @RahulNath  Před 9 měsíci

      Thanks, will do! Happy to hear that Prabodha

  • @md.ajijulhoque2190
    @md.ajijulhoque2190 Před 3 lety +2

    Very informative 👍

  • @rajeshselvam564
    @rajeshselvam564 Před 3 lety +2

    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  Před 3 lety

      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!

  • @tonyburg
    @tonyburg Před rokem

    wow, this was definitely better than reading Microsoft documentation, thanks!

    • @RahulNath
      @RahulNath  Před rokem

      Glad you liked it! Do check out the full series bit.ly/asp-net-core-series

  • @juniorzucareli
    @juniorzucareli Před 2 lety

    you're a beast, great video!

    • @RahulNath
      @RahulNath  Před 2 lety +1

      Thank you! Hope you are enjoying the full series bit.ly/asp-net-core-series

  • @schweppesmandarin8839
    @schweppesmandarin8839 Před 2 lety

    amazing tutorial! really clearly explained

    • @RahulNath
      @RahulNath  Před 2 lety

      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 Před 2 lety +1

      @@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  Před 2 lety

      @@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.

  • @jesusmendoza6536
    @jesusmendoza6536 Před rokem

    Best of all time!

    • @RahulNath
      @RahulNath  Před rokem

      Thank you Jesus! You might also like this which covers different options when building an app www.rahulpnath.com/blog/handling-application-configuration/

  • @juhairahamed5342
    @juhairahamed5342 Před 2 lety +1

    Good Explanation

    • @RahulNath
      @RahulNath  Před 2 lety

      Thanks and welcome. Do checkout the full series here bit.ly/asp-net-core-series

  • @arminsh7068
    @arminsh7068 Před 3 lety +2

    Nice one, please Continue..

    • @RahulNath
      @RahulNath  Před 3 lety

      Sure will. Let know if you are looking for any particular topics.

  • @niroshanmanoharan4295
    @niroshanmanoharan4295 Před 3 lety +1

    Another great video. Your teaching skill is awesome. Thank you Rahul.

    • @RahulNath
      @RahulNath  Před 3 lety

      Thanks again 😀 I should give credit to my mom who is a teacher

    • @niroshanmanoharan4295
      @niroshanmanoharan4295 Před 3 lety

      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  Před 3 lety +1

      @@niroshanmanoharan4295 Haha yes, Still trying to work out being more relaxed with the camera on. Sure will do 😀

  • @bdd740
    @bdd740 Před 2 lety

    Thanks a lot for great content.

    • @RahulNath
      @RahulNath  Před 2 lety +1

      Glad you liked it! Do check out the full series here bit.ly/asp-net-core-series

    • @bdd740
      @bdd740 Před 2 lety

      ​@@RahulNath​I am doing it right now. Thanks a lot.

    • @RahulNath
      @RahulNath  Před 2 lety

      @@bdd740 Do let me know your feedback and suggestions 👍

  • @edadson
    @edadson Před 2 měsíci

    Good job!

    • @RahulNath
      @RahulNath  Před měsícem

      Thanks! Hope you are liking the series bit.ly/asp-net-core-series

  • @nazarinebeats5521
    @nazarinebeats5521 Před rokem

    This is high value, I would buy a course from you!

    • @RahulNath
      @RahulNath  Před rokem

      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

    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  Před rokem

      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 Před 2 lety +1

    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  Před 2 lety

      Thank you Seble. That’s a feature in Rider IDE and one of the reasons I use that for these videos . Easier to explain 😀

  • @anfield6321
    @anfield6321 Před rokem

    MAKING VIDEOS AT 4 IN THE MORNING, COOOOOOOOOL

    • @RahulNath
      @RahulNath  Před rokem

      Haha, that's when the house is the quietest. All my videos are recorded during that time.

  • @koolmint-wf4lh
    @koolmint-wf4lh Před rokem

    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

  • @ganirban82
    @ganirban82 Před 3 lety +2

    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  Před 3 lety

      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 Před 3 lety

      @@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,

  • @clashclan4739
    @clashclan4739 Před 2 lety

    Hi Bro, From where/which source you got this in-depth knowledge. so impressive!!!!!!!!!!!!!!!!

    • @RahulNath
      @RahulNath  Před 2 lety

      Thank you a lot and glad you are liking the videos. It's mostly been reading around the Microsoft documentation.

  • @partisanemo2079
    @partisanemo2079 Před 2 lety

    Awesome! I wonder if all this is applicable and pertinent to Blazor WebAssembly non-ASP.NET hosted.

    • @RahulNath
      @RahulNath  Před 2 lety

      Not sure - haven't been doing any Blazor. Do let me know if you were able to!

  • @yusongliew3680
    @yusongliew3680 Před 2 lety +1

    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  Před 2 lety

      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 czcams.com/video/VEjYW14WKRM/video.html
      Let me know if that answers your question.

  • @yogeshbondi7321
    @yogeshbondi7321 Před 2 lety

    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  Před 2 lety

      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)

  • @asldev
    @asldev Před rokem

    💣💣💣

    • @RahulNath
      @RahulNath  Před 11 měsíci

      🚀🚀🚀 bit.ly/asp-net-core-series

  • @atmanirbharbharat
    @atmanirbharbharat Před 3 lety +1

    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  Před 3 lety

      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. czcams.com/video/6l_kpygO0Ic/video.html
      Let know if that helps or if you have additional questions.

  • @rajendrank9582
    @rajendrank9582 Před 3 lety +1

    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  Před 3 lety

      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 Před 3 lety

      @@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.

  • @barwalgayatri4655
    @barwalgayatri4655 Před 2 lety +1

    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  Před 2 lety

      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 czcams.com/video/5oTX6srQdOE/video.html
      What in particular are you looking for here?

    • @barwalgayatri4655
      @barwalgayatri4655 Před 2 lety +1

      @@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  Před 2 lety

      @@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 Před 2 lety

    But is it possible to write to configuration using some build-in net core options?

    • @RahulNath
      @RahulNath  Před 2 lety

      Sorry didn't understand the question - Can you elaborate what you are trying to achieve?

    • @devaliero-3d597
      @devaliero-3d597 Před 2 lety

      @@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.

  • @mohsinbhat3895
    @mohsinbhat3895 Před 2 lety +1

    please give videos on web apis

    • @RahulNath
      @RahulNath  Před 2 lety

      What videos are you looking for ? Here’s the full ASP Series czcams.com/play/PL59L9XrzUa-nqfCHIKazYMFRKapPNI4sP.html

  • @uchitesting
    @uchitesting Před rokem

    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 Před rokem

      Thanks for the video. It was awesome.

    • @RahulNath
      @RahulNath  Před rokem +1

      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 Před rokem

      @@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  Před rokem

      ​@@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!!

  • @lakshanmadubashika3248

    could you make a new vedio for dotnet 6 configuration

  • @jesusmendoza6536
    @jesusmendoza6536 Před rokem

    Hello, do you have a .NET course ? On Udemy o something like that.?

    • @RahulNath
      @RahulNath  Před rokem +1

      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 Před rokem

      Yup, to be honest at that time I didn’t see, but yeah. I see, absolutely one of bests. 👏

    • @RahulNath
      @RahulNath  Před rokem

      @@jesusmendoza6536 Thank you Jesus!!

  • @prateekbhardwaj9943
    @prateekbhardwaj9943 Před 3 měsíci

    u can improve videos if u improve emotions, and some voice modulation..plain expression and body language is less engaging

  • @rrcoura
    @rrcoura Před 3 lety +2

    Good video, but you can lower the size of your face showing, and please, be more unformal.

    • @RahulNath
      @RahulNath  Před 3 lety +2

      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 Před 3 lety +1

      Another question, is there a way to get a License of Rider the IDE you are using?

    • @RahulNath
      @RahulNath  Před 3 lety +1

      ​@@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 Před rokem

    Good Explanation

    • @RahulNath
      @RahulNath  Před rokem

      Thanks for liking. The full series is here bit.ly/asp-net-core-series

  • @barwalgayatri4655
    @barwalgayatri4655 Před 2 lety

    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  Před 2 lety

      Replied here czcams.com/video/5GlgHV_12-k/video.html&lc=Ugx8OJ4UpefrHYUjAFJ4AaABAg.9SzdyYZMm-W9SznHUZp5Bk
      (Next time please avoid copy pasting comment, as I've to copy paste replies too 😀)