- 342
- 612 300
Learn Smart Coding
United States
Приєднався 16 лип 2020
Welcome to LearnSmartCoding, the go-to channel for developers seeking to enhance their skills in various technical topics. This channel is dedicated to providing high-quality tutorials, tips, and tricks to help you become a smarter and more efficient coder.
Covering a wide range of topics, from Angular and DOTNET CORE Web API to JavaScript, Dockers, Kubernetes, Azure DevOps CI/CD, and Azure, I strive to cater to your learning needs. My videos are designed to be beginner-friendly and easy to follow, yet informative and in-depth enough for advanced developers.
As a passionate coder, I am committed to sharing my knowledge and expertise with you. Whether you're just starting out or already a pro, this channel has something for everyone. Join our community of smart coders and take your coding skills to the next level.
Subscribe now and never miss out on the latest tutorials and updates. Let's learn, grow, and code smarter together!
Covering a wide range of topics, from Angular and DOTNET CORE Web API to JavaScript, Dockers, Kubernetes, Azure DevOps CI/CD, and Azure, I strive to cater to your learning needs. My videos are designed to be beginner-friendly and easy to follow, yet informative and in-depth enough for advanced developers.
As a passionate coder, I am committed to sharing my knowledge and expertise with you. Whether you're just starting out or already a pro, this channel has something for everyone. Join our community of smart coders and take your coding skills to the next level.
Subscribe now and never miss out on the latest tutorials and updates. Let's learn, grow, and code smarter together!
Set Up Swagger UI Authentication with Azure AD | Step-By-Step Guide
In this video, I’ll show you how to integrate Azure Active Directory authentication with Swagger UI for securing your API. We’ll cover the entire process from setting up your Azure AD app registration, configuring OAuth2 flow, to configuring Swagger UI for authentication. This setup ensures that your API endpoints are protected, and only authorized users can access them. If you’re looking to improve your API security with Azure AD and Swagger, this is a must-watch tutorial!
You’ll learn:
How to register your API and Swagger application in Azure AD
Setting up OAuth2 Authorization Code Flow with PKCE for secure authentication
Configuring Swagger UI to use Azure AD for user authentication
How to add API scopes and manage access permissions
Perfect for .NET developers and anyone looking to integrate Azure AD authentication with their APIs. Watch this video and learn to secure your APIs in no time!
Repo : github.com/learnsmartcoding/CleanArchitecture-ToDoApp-DotNet8-WebApi
Branch: feature/setup_swagger_authentication_with_AzureAD
github.com/learnsmartcoding/CleanArchitecture-ToDoApp-DotNet8-WebApi/tree/feature/setup_swagger_authentication_with_AzureAD
Please post your questions in the comment section and I will be happy to answer your questions.
Subscribe for more useful videos just like this: ua-cam.com/channels/KUxSY2xp12QiP3c60sOc-g.html
Happy coding!
You’ll learn:
How to register your API and Swagger application in Azure AD
Setting up OAuth2 Authorization Code Flow with PKCE for secure authentication
Configuring Swagger UI to use Azure AD for user authentication
How to add API scopes and manage access permissions
Perfect for .NET developers and anyone looking to integrate Azure AD authentication with their APIs. Watch this video and learn to secure your APIs in no time!
Repo : github.com/learnsmartcoding/CleanArchitecture-ToDoApp-DotNet8-WebApi
Branch: feature/setup_swagger_authentication_with_AzureAD
github.com/learnsmartcoding/CleanArchitecture-ToDoApp-DotNet8-WebApi/tree/feature/setup_swagger_authentication_with_AzureAD
Please post your questions in the comment section and I will be happy to answer your questions.
Subscribe for more useful videos just like this: ua-cam.com/channels/KUxSY2xp12QiP3c60sOc-g.html
Happy coding!
Переглядів: 228
Відео
Angular 18 Resolver: Pre-Load Data Complete Guide
Переглядів 154День тому
In this tutorial, learn how to implement Angular 18 Resolvers to fetch data before loading a component. This approach ensures that your components have all the necessary data before they are rendered. We will walk through setting up a resolver, attaching it to your route, and accessing the resolved data in your component. Perfect for Angular developers looking to improve data handling in their ...
Mastering Angular 18's @Input and @Output for Seamless Data Sharing
Переглядів 167День тому
In this Angular 18 tutorial, we dive deep into @Input() and @Output() decorators to manage data between components. We’ll build a course details component to display the content in view mode and create a review component for guests to submit their reviews. You’ll learn how to pass data from parent to child components using @Input() and how to emit events from child components back to the parent...
Angular 18 Dynamic Form with Reactive Forms & CRUD Operations
Переглядів 142День тому
In this Angular 18 tutorial, we’ll build a dynamic form using Reactive Forms to perform CRUD operations on course details, including session management. We’ll walk you through setting up the form to handle multiple sessions dynamically, allowing users to add or remove sessions for a course. Learn how to bind your model to the form, manage form arrays, and implement validations to ensure a smoot...
Mastering GLOBAL Error Handling in Angular Made EASY
Переглядів 113День тому
In this tutorial, learn how to implement global error handling in Angular for both HTTP and non-HTTP errors. This video covers setting up a custom GlobalErrorHandler for non-HTTP errors and how to use HTTP interceptors for catching and handling API errors. We’ll also cover how to simulate errors, handle circular dependencies, and provide a seamless user experience using Toastr for notifications...
Secure Sign-In Made EASY With Azure AD B2C's BEST MFA Tips!
Переглядів 11614 днів тому
In this video, we’re diving deep into essential Azure AD B2C settings to help you create a secure, seamless user experience for your application. Learn how to configure 'Per User MFA' for added security, set up the 'Remember Me' functionality for user convenience, and apply custom branding to your login and sign-up pages to reflect your company’s identity. I’ll guide you through each of these c...
Clean Architecture Explained: A Step-by-Step Guide to a ToDo App
Переглядів 66714 днів тому
In this video, we dive deep into Clean Architecture principles as we build a fully functional ToDo application using .NET Core 8 and Web API. You’ll learn how to structure your application for maintainability and scalability while implementing best practices for code organization. We will cover essential topics including: The layers of Clean Architecture Implementing repositories and services S...
How to Set Up In-Memory Database in 5 Minutes!
Переглядів 7114 днів тому
In this video, we dive into database seeding techniques for both in-memory and real databases in a .NET 8 Clean Architecture project. Learn how to set up Entity Framework Core for in-memory testing and configure real database seeding for production. We’ll walk you through the setup, configuration, and best practices for seeding your data using .NET 8 and EF Core in a scalable Clean Architecture...
Stop Breaking Your Code - Learn Unit Testing Now
Переглядів 15214 днів тому
In this video, we cover unit testing fundamentals in a .NET 8 Clean Architecture project! From setup to test execution, learn how to structure your unit tests using xUnit and Moq in a modular and maintainable .NET 8 application. We'll walk you through creating tests for services and repositories, explaining best practices to help you write clean, effective tests that ensure your application’s r...
Top EF Core Interview Q&A: Real-World Scenarios & Expert Answers!
Переглядів 16021 день тому
Are you getting ready for an EF Core interview? This video covers the top EF Core questions you need to know to impress any interviewer! From key EF Core concepts to troubleshooting, data logging, and performance optimization, we'll explore the questions that highlight your practical, real-world skills. These questions and answers go beyond the basics, addressing essential EF Core functions lik...
Angular 18 Lazy Loading Guide: Traditional vs. Standalone Components
Переглядів 46421 день тому
Discover the power of lazy loading in Angular 18 to optimize your application’s performance. This video covers both the traditional lazy loading approach with NgModules and the latest standalone component-based lazy loading introduced in Angular 18. Learn step-by-step how to set up lazy loading routes and understand when to use each method. We also walk you through implementing lazy-loaded guar...
Angular ANIMATIONS That Will Make Your Website POP!
Переглядів 31521 день тому
Enhance user experience with smooth page transitions in your Angular app! In this video, we demonstrate how to set up route animations using Angular’s powerful animations library. You’ll learn how to apply custom transitions for seamless navigation between pages, making your app feel more professional and engaging. Whether you're a beginner or experienced developer, this step-by-step guide will...
CanDeactivate GUARD Saves You from Unsaved Changes!
Переглядів 16128 днів тому
Learn how to use the CanDeactivate guard in Angular to prevent accidental navigation and protect unsaved changes! This quick tutorial shows you how to set up the guard, create prompts for users, and enhance your app’s user experience by ensuring users don’t lose their data. Perfect for Angular developers looking to add an extra layer of safety to their forms and other critical data entry points...
Master AZURE POLICY in 15 Minutes FLAT!
Переглядів 76Місяць тому
Learn how to harness the power of Azure Policy to manage and govern your cloud resources efficiently! In this video, we'll delve into the world of Azure Policy, exploring what it is, how it works, and its benefits. Discover how Azure Policy enables you to define, assign, and manage policies that enforce compliance, security, and governance across your Azure subscriptions and resources. Whether ...
You Won't Believe How SIMPLE Azure RBAC Can Be!
Переглядів 110Місяць тому
Learn Azure RBAC (Role-Based Access Control) the easy way! In this video, we'll break down the complexities of Azure RBAC and show you how to implement it in a simple and effective manner. Discover how to assign roles, manage access, and control permissions in Azure with ease. Whether you're a beginner or an experienced Azure user, this video is perfect for anyone looking to master Azure RBAC a...
Conquer the .NET Core and Web API Interview in 2024!
Переглядів 425Місяць тому
Conquer the .NET Core and Web API Interview in 2024!
JWT SECRETS That Will Change Your Future
Переглядів 208Місяць тому
JWT SECRETS That Will Change Your Future
Net Core 8 with SignalR is the FASTEST Combo for Real-Time Chat Apps
Переглядів 670Місяць тому
Net Core 8 with SignalR is the FASTEST Combo for Real-Time Chat Apps
Build Your First Full Stack Web App From Zero to Hero!
Переглядів 4,2 тис.Місяць тому
Build Your First Full Stack Web App From Zero to Hero!
Angular 18 Auth Guards: The Ultimate Guide!
Переглядів 773Місяць тому
Angular 18 Auth Guards: The Ultimate Guide!
Angular 18 Reactive Forms CRUD - Ultimate Guide for Beginners
Переглядів 1,3 тис.Місяць тому
Angular 18 Reactive Forms CRUD - Ultimate Guide for Beginners
Master Angular Image Uploads to Azure Storage in Minutes!
Переглядів 268Місяць тому
Master Angular Image Uploads to Azure Storage in Minutes!
The Secret to Building a dotnet core 8 Web API That Actually Works
Переглядів 190Місяць тому
The Secret to Building a dotnet core 8 Web API That Actually Works
The EXPERT Guide to NgRx Spinner and Toaster for Angular Mastery
Переглядів 214Місяць тому
The EXPERT Guide to NgRx Spinner and Toaster for Angular Mastery
Master Angular NOW Build Your First Web App Step-by-Step
Переглядів 170Місяць тому
Master Angular NOW Build Your First Web App Step-by-Step
Master Angular Directives in Record Time with Real World Examples
Переглядів 150Місяць тому
Master Angular Directives in Record Time with Real World Examples
What If You Could MASTER Angular Data Binding in Minutes?
Переглядів 95Місяць тому
What If You Could MASTER Angular Data Binding in Minutes?
Supercharge Your .NET Core API with Azure Monitor
Переглядів 2262 місяці тому
Supercharge Your .NET Core API with Azure Monitor
How to Implement Health Checks & Liveness Probes in .NET Core Web API | Step-by-Step Guide
Переглядів 2622 місяці тому
How to Implement Health Checks & Liveness Probes in .NET Core Web API | Step-by-Step Guide
Azure AD Roles & Security Groups | Setup & Integration for .NET Core 8 Web API & Angular 18
Переглядів 3612 місяці тому
Azure AD Roles & Security Groups | Setup & Integration for .NET Core 8 Web API & Angular 18
Good luck
Good one! Subscribed, liked, commented and shared :)
Thanks for your support! I appreciate you watching and sharing.
Great video...thanks for the knowledge
Hey for me the CSS and custom style is loaded but the page is not fuctional. I do not get an error and when I click submit nothing happens. Is there a way to display the error?
Hi, Thank you for watching the video. You could see errors in the developers' tool console, for windows press F12. If you don't find any error, I suggest repeat the step as per video and see if you missed any steps. Please let me know how it goes.
@learnsmartcoding I will check again. The html content is coming from a next js server component page, could this be a problem?
Is there any video related to css bootstrap
Hi, Thank you for watching. I do not have any video focusing only on CSS. I suggest the w3school website is good for learning.
Can you help me to understand why you created separate tenants for Front end and Back end
Hi Sandeep, Thank you for your question! I believe there’s a slight misunderstanding. In the video, I didn’t create separate tenants for the frontend and backend. Here's What I Did: My Azure account already has a default Azure AD tenant (associated with my Microsoft account). I used this tenant to register applications for the frontend (Angular) and backend (ASP.NET Core Web API). App Registrations: I registered two separate applications in the same tenant: One for the frontend, to handle user authentication and acquire tokens. Another for the backend, to secure the API and validate the tokens sent by the frontend. Why Separate App Registrations? This separation ensures proper security and role definition: The frontend application gets an access token with appropriate scopes to call the backend API. The backend application validates the token to ensure the requests are authorized. Key Takeaway There is no need to create a new tenant for Azure AD. I simply used the default tenant in my Azure account and registered the necessary applications under it. This is the standard practice for implementing Azure AD with SSO. If anything is unclear, feel free to ask! 😊
When does the the component get destroyed for module based and standalone based when lazy loaded ?
Hi Viznu, Great question! When a lazy-loaded component is destroyed, whether it’s module-based or standalone, the behavior is the same because Angular's lifecycle management is consistent across both approaches. When a Component Gets Destroyed: Module-Based Lazy Loading: The component is destroyed when its view is removed from the DOM, such as when you navigate away from its route or the parent component that hosts the lazy-loaded module is destroyed. Standalone Component Lazy Loading: Similarly, the standalone lazy-loaded component gets destroyed when it is no longer part of the active DOM, typically due to route changes or the destruction of its hosting component. Key Lifecycle Hook: In both cases, the ngOnDestroy lifecycle hook is triggered just before the component instance is destroyed, allowing you to clean up subscriptions, resources, or memory leaks. The main difference between module-based and standalone approaches lies in the structure and modularity, but the lazy loading lifecycle remains identical. Let me know if you'd like further clarification or examples!
Thank you for the fantastic session, well explained, we are expecting many more such fantastic training videos in .NET and angular (full stack)
Thank you! I'm glad you enjoyed the video. You can expect more on .NET and angular in the future.
Please use react instead of angular
Hi, Thank you for the feedback. I will make react and angular apps going forward.
@learnsmartcoding thanks for replying
Does this this repo really eorking after setup? Plese let me
Hi, you need to get the api key from openai. I have shown how to register and get api key.
Could you please share the code or a step by step tutorial for azure ad authentication for the website shown in the above video. Thanks for the tutorial on jwt tokens
Hi, Thank you for watching. The app shown in the video is "Online Course Enrollment" application and used Azure AD B2C. Here is the video link. ua-cam.com/video/Cxftp90K_ek/v-deo.htmlsi=zLaRlzbAVi2oxcx8 I also have made many Azure AD, Azure AD B2C authentication videos and can be found from below link (it filters specific video) www.youtube.com/@learnsmartcoding/search?query=azure%20ad Feel free to let me know if you have any other questions. Hope this helps
How to do it if you're on a mac?
Hi, You can run an Angular app on a Mac by installing Node.js and Angular CLI. After that, clone or create an Angular project, install dependencies using npm install, and start the app with ng serve. You can then access it in your browser at localhost:4200. Let me know if you need more detailed steps! 😊
Thank you so much for this video. Please tell us how to co-y paste the README file. Did not get it. I'm a beginner. Also tell us how to use the code from git repo.
Hi, You can find the README file within the GitHub repo, and use git clone to download the code. In case you want to learn GIT, please check this video ua-cam.com/video/Xohwrcr7AKQ/v-deo.htmlsi=LGvSyf8SnqiO8rUy Repos: github.com/learnsmartcoding/online-course-api github.com/learnsmartcoding/online-course-ui github.com/learnsmartcoding/online-course-functions Hope this helps
here main content is key .how can you got key here, when i am trying to access key its showing Request quota exceeded. Check your API plan and billing. is there any free api and key can you help me out
Hi Harsha, Thank you for watching. Yes, API_KEY is the main here to access ChatGTP APIs. You need to register with OpenAI and get API Key. Depending on where you are, the cost might be different. There is no Free plan to my knowledge. Hope this helps.
I am facing same issue after deploying angular website in hostinger. I have added web.config file in src/ and updated the angular.json however still issue persist. I would appreciate quick help here. Thanks
Hi Narmata, Thanks for trying it out. Is the hosting you deployed your angular code a Windows server or Linux server? This video is for a windows based server, and for Linux, the configuration is a bit different. Please share some error details as well to assist you further. Looking forward to hearing from you.
Thanks for the video, Ngx-bootstrap integration part is very helpful with angular18
I'm happy you found it useful!
Slow down a bit. Are you making other people understand or just going through the whole process.
Hi TechWizard, Thank you for the feedback. Point taken. Will go bit slow!
brother please tell me what are topics which is mandatory to learn being a .net developer.
Hi Muhammad, Great question! To be a proficient .NET developer, here are some mandatory topics to focus on: Core .NET Skills: C# Fundamentals: Understand object-oriented programming (OOP) concepts, LINQ, collections, async/await, and exception handling. ASP.NET Core: Learn how to build web applications and APIs using controllers, middleware, dependency injection, and Razor pages. Entity Framework Core: Master database operations like migrations, queries, and relationships using EF Core. Web APIs: Know how to build RESTful APIs, handle HTTP methods, and manage authentication/authorization (e.g., JWT or OAuth2). Tools & Practices: Version Control: Get familiar with Git and platforms like GitHub or Azure DevOps. CI/CD: Understand the basics of automating builds and deployments using Azure DevOps or GitHub Actions. Unit Testing: Learn about testing frameworks like xUnit or MSTest. Docker and Containers: Understand how to containerize .NET applications. Additional Topics: Authentication & Authorization: Learn Azure AD or IdentityServer for securing apps. Cloud Platforms: Focus on Azure as it's widely used with .NET apps. Microservices: Understand how to build and integrate smaller services with gRPC or REST. Focus on project-based learning-building real-world apps will help you apply what you learn and stand out as a developer. Let me know if you'd like a more detailed roadmap or resources for any of these! while Docker and CI/CD may not be "mandatory" at the entry level, they’re highly recommended as you grow into more senior or versatile roles. Hope this clarifies your questions and feel free to let me know if you have any other questions. Happy coding!
@learnsmartcoding thanks plz tell me what are the topics in azure for .net developer?
I strongly suggest to go through the details in this full stack web development video. github.com/learnsmartcoding/restaurant-table-booking-app.api raw.githubusercontent.com/learnsmartcoding/restaurant-table-booking-app.api/main/RestaurantTableBookingApp.API/RestaurantTableBooking.svg The important Azure services are covered in this applications. Here is the video link. ua-cam.com/video/70q8PanGbnw/v-deo.htmlsi=79CR3LrelvvnR7W7 Let me know if this helps.
Hi storageaccount connectionstring is empty due to that unable to see the images in UI can you please help me on that
Hi Karthikeyan, Thank you for watching the video. Please follow the steps in the below video clip, you will be able to setup the Azure storage account and get the connection string. Unfortunately, I cannot share the connection string from end. Upload Image to Azure Storage (Using Angular & Web API): 08:34:15 - 08:49:55 Please let me know if you need any other help or questions. I'm happy to assist you. Happy coding!
Thank you
Hi sir can u make all microservices patterns and example saga and others so that we can understand microservices start to end
Hi Vivek, sure. I will make the ToafoApp in different architectures similar to how we did with clean architecture. Stay tuned.
Thank you. It's worked for me.
I'm glad it worked for you! Happy coding!
KK sir, how would I register DI for DBContext class for the database in SQL server ? Sir I have added the EF core package in Infra layer so how do I register DI for DBContext in program.cs ? I hope you got my point
Hi MP, Thank you for the question. For the DBContext, we register in the program.cs github.com/learnsmartcoding/CleanArchitecture-ToDoApp-DotNet8-WebApi/blob/main/TodoApp.WebAPI/Program.cs#L47 With this, you can use it as mentioned below. With this, the app can provide an instance of DbContext to the repository. github.com/learnsmartcoding/CleanArchitecture-ToDoApp-DotNet8-WebApi/blob/main/TodoApp.Infrastructure/Repositories/UserRepository.cs#L17 Hope I answered your question. Please ask if you have any other questions or if you need more info on the current question, feel free to let me know. I'm happy to answer! Happy coding!
you will have to use builder.Services.AddDbContext<NameOfDbContext> just like this one builder.Services.AddDbContext<ApplicationDbContext>(options => { options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")); }); and in appsettings: "ConnectionStrings": { "DefaultConnection": "your connectionstring" } but i prefer to make a di injection class in the same project and send it over via IServiceCollection to keep program.cs cleaner
@salar1997 yes I got that but dbcontext requires EF okay .. EF package has been installed in only Infrastructure layer
@@learnsmartcoding thanks sir I got it now .. we have to use the reference of Infra layer in API project so as to use EF DBconext in program.cs
@@MP_04_02 yeah i missunderstood, but instead of making a DI class only for dbcontext, just make a DependencyInjection class in infrastructure and lay dbcontext and the repository services there instead, then its not neccessary to add them in program.cs
hi, from where I can find apis?
Hi, Thank you for watching. The APIs can be found here github.com/learnsmartcoding/online-course-api Hope this helps.
if we have different tenants then can we take ad config from db instead of json .
Hi there, Thanks for watching the video and for your question! If you're using different tenants, the simplest way to manage them is by registering your app as a multi-tenant application in Azure AD. This way, users from any tenant can access the application without needing separate configurations per tenant. Typically, this is done by setting the TenantId to common in the app configuration, which allows Azure AD to handle users from multiple tenants without dynamically switching configurations. Loading Azure AD configurations (like client IDs or secrets) dynamically from a database based on each incoming request is technically challenging and generally not a standard approach. Azure AD configurations are usually stored in a static file (like appsettings.json) or set up with a single, centralized configuration, especially in multi-tenant scenarios. If you have tenant-specific requirements (like different user permissions or custom settings), you could implement conditional logic within the application to handle these based on user claims or tenant IDs, while keeping the core Azure AD configuration static. Let me know if you have further questions or if there’s anything specific you’re trying to achieve - happy to help!
nice
I'm glad you liked it!
Thank you for the fantastic content! Just a suggestion-it would be wonderful if you could consider including Azure AD login for Swagger in this tutorial.
Thank you. Sure, I added to the list.
Great tutorial! You’re showcasing the classic release method here, but the modern approach typically leverages deployment stages within Azure DevOps pipelines. Stages provide more granular control, allowing for smoother transitions across environments like Dev, QA, and Prod, while enabling approvals and conditions for a more flexible release process.
Thank you! I’ll definitely cover deployment stages in another video.
Hi Karthik thankyou so much for your amazing content, can I expect UI for this todo app.
Yes, definitely
how many years of experience you have as .net full stack developer?
Hi Vijay , I have 15+ years of experience. Hope you liked this video.
@@learnsmartcoding yes I really liked this video and May I request you to use Hindi also or maybe another channel in hindi
I am seeing you video more tamil and english. It is understandable and more useful, really thanks bro
Hi Mani, Thank you for watching. I will make more
Could you please make C# scenario based interview questions. Especially OOPS STATIC CLASS CONSTRUCTOR TYPES EXTENSION METHOD PARTICAL CLASS INTERFACE MORE CONCEPTS....
Hi Mani, sure, noted. Will make it.
Hi sir can u do more videos on sonarqube and unit testing videos
Hi Vivek, Thank you for the comment. Sure, I will make more on unit testing. This video is basic of unit testing with an architectural pattern. Hope you like it.
Hi Karthik, During the session CI/CD for Angular & Deployment to Azure, I got this error when I ran the pipeline for Angular. Can you please help me with this? Error: Could not find the '@angular-devkit/build-angular:application' builder's node package. ##[error]Cmd.exe exited with code '1'.
Hi Nikil, I replied details to your email. Hope that helped. Let me know for more questions
Great questions and superb explanation ..Thank u KKsir 👍
I appreciate it! Stay tuned for more.
Hi Karthik, My API is not able to fetch the data from the DB. Can you please helpme on this.
Hi, I am happy to help. Please provide more details like the error you are getting so I can assist you better.
@learnsmartcoding I my getting 500 error when trying to access my apis. I have checked all the configurations and code. Everything is the same as videos. The only change I have noticed is in the connection string. The connection string password is using the old dB password. Even after multiple release after change the connection string is not changing
Hi Nikhil, Thanks for reaching out. Let's troubleshoot the issue with the 500 error when accessing the APIs. First, let's confirm a couple of things to narrow down the problem: Local Database Connection: Please make sure the database connection string is set up correctly in your local environment. If it’s working locally, that confirms the connection string and DB are correctly configured in development. You should be able to see specific error messages locally that can help us pinpoint what’s wrong. Deployment Environment: If you're seeing this error after deploying to Azure, there may be a mismatch in the configuration there. Sometimes, even if you update the connection string in your release pipeline or Azure App Configuration, old settings can linger, causing connection issues or even missing configurations. Here are a few steps you could try to resolve it: Double-check the connection string in the Azure portal (under Configuration settings for your Web App or App Service). Ensure that it’s updated with the correct password and details. Verify that your App Service is pointing to the right environment variables and settings for the database connection string. You might want to restart the App Service after updating the settings to make sure it picks up the latest configuration. Error Messages: If you’re comfortable troubleshooting locally, please check the error message details by reviewing the logs. This can give a specific reason for the 500 error, whether it’s a connection timeout, authentication failure, or something else. If you’re still having trouble or feel more comfortable sharing more details, please send the full error message to my email, and I’d be happy to assist further. Let me know how it goes!
@@learnsmartcoding Thanks for the help. Will try the given steps. Also can you please give me the mail I'd if the error persists.
Sure. You can reach out to me here Learnsmartcoding@gmail.com
From where we are getting the user details like "salem","Karthik",while decoding the token ?Is there a list of users added anywhere?i am trying to get the access toke which has such user details when a user logs in to crm d 365 application.can yu help me on this?
@learn smart coding.
Hi Varshitha, Great question! The user details, like names or custom attributes (e.g., "salem" and "Karthik"), are typically added to the ID token or access token in Azure AD B2C by configuring custom user attributes. In Azure AD B2C, these details aren't automatically included-they need to be specified in the policy and added to the token configuration. Here's how it generally works: User Attributes: In your Azure AD B2C tenant, you can configure custom user attributes. Go to the User attributes section in Azure AD B2C and add any custom fields you need. User Flows or Custom Policies: When setting up your user flows (like SignUpSignIn or ProfileEdit), make sure these attributes are configured to be collected and stored as part of the user profile. In the flow, you can also specify which attributes are returned in the token. Token Configuration: In your App Registration settings, go to Token configuration to add claims. Here, you can include the specific user attributes you want to see in the token. CRM Dynamics 365 Integration: To integrate with CRM D365, make sure the app registration for D365 has the correct permissions to read the token and retrieve user attributes. If you're looking to retrieve specific attributes when the user logs into CRM D365, you’ll want to ensure that these attributes are defined and added in the Azure AD B2C token. This way, each time the user logs in, you’ll get a token with all required user details. Let me know if you need more help with setting up these steps, and I’d be happy to dive deeper!
Its really useful; please continue the same and, more specifically, your voice more humble and clear . keep continue
Thank you, I will
Thank you ❤
I'm glad you enjoyed it! 👍
Thank you so much for this video. Please go live maybe once in a week.
Great idea! I'll see if I can schedule a live stream soon. If you would join, what time is preferred? Also, what content do you expect ? I will plan for my first live this month 🙌
@@learnsmartcoding hi...! I loved the video do you have the SQL script so I can create all the tables, etc ? I heard you mentioned in would be in the description, but couldn't find it - let me know thank you !
Hi, Thank you for watching. The database script is in API project. github.com/learnsmartcoding/online-course-api/blob/main/LSC.OnlineCourse.Data/Database_Script/OnlineCourseDB.sql Hope this helps.
Thank you very much , what's wrong ? the error Export-PfxCertificate : Password and ProtectTo cannot both be absent At line:1 char:86 + ... 0C62214689F09410E | Export-PfxCertificate -FilePath C:\Temp\mypfx.pfx + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Export-PfxCertificate], ArgumentException + FullyQualifiedErrorId : NullInput,Microsoft.CertificateServices.Commands.ExportPfxCertificate
Hi Daisy, The error message you're seeing indicates that both the -Password and -ProtectTo parameters are missing when using the Export-PfxCertificate cmdlet. At least one of these parameters must be provided for the export to proceed. Here’s what each parameter does: -Password: Specifies a password to protect the exported PFX file. -ProtectTo: Specifies a list of users or groups that are allowed to access the private key. Since you need to protect the exported PFX file, adding the -Password parameter should resolve the error. Solution Try running the command again with the -Password parameter: Export-PfxCertificate -Cert "cert:\CurrentUser\My\0C62214689F09410E" -FilePath "C:\Temp\mypfx.pfx" -Password (ConvertTo-SecureString -String "YourPasswordHere" -Force -AsPlainText) Replace "YourPasswordHere" with a secure password of your choice. Explanation The ConvertTo-SecureString cmdlet is used here to create a secure string password, which is required by the -Password parameter. Let me know if this resolves the issue!
@@learnsmartcoding I had Figureout it with you method. when i use it , error says can not find Thumbprint in localmachine/my shows as below: Invoke-Icacls : Cannot process argument transformation on parameter 'Thumbprint'. Cannot convert value to type System.String. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:708 char:43 + Invoke-Icacls -Thumbprint $cert.Thumbprint + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Invoke-Icacls], ParameterBindingArgumentTransformationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,Invoke-Icacls Get-ChildItem : Cannot find path '\localMachine\my\FCB6D33D2A25F863BDD103F95EEAEA3861C706A1 38E86F81A3B492749360C9D27A30D5D98878AE33 1E1083E52F826E4FE9BDF40BD78EAC7F97326052' because it does not exist. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:711 char:17 + ... Get-ChildItem -Path "cert:\localMachine\my\$thumbprint" | ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (\localMachine\m...78EAC7F97326052:String) [Get-ChildItem], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand Export-PfxCertificate : Object reference not set to an instance of an object. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:711 char:75 + ... umbprint" | Export-PfxCertificate -FilePath (Join-Path -Path $current ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Export-PfxCertificate], NullReferenceException + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.CertificateServices.Commands.ExportPfxCertificate Import-PfxCertificate : The PFX file could not be found. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:712 char:17 + ... Import-PfxCertificate -FilePath (Join-Path -Path $current ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Import-PfxCertificate], FileNotFoundException + FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.CertificateServices.Commands.ImportPfxCertificate Remove-Item : Cannot find path 'C:\DynamicsTools\CleanVHD\FCB6D33D2A25F863BDD103F95EEAEA3861C706A1 38E86F81A3B492749360C9D27A30D5D98878AE33 1E1083E52F826E4FE9BDF40BD78EAC7F97326052.pfx' because it does not exist. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:713 char:17 + ... Remove-Item -Path (Join-Path -Path $currentDirectory -Chi ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\DynamicsTool...C7F97326052.pfx:String) [Remove-Item], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand Replace-StringInFile : Cannot process argument transformation on parameter 'replaceString'. Cannot convert value to type System.String. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:797 char:112 + ... th -findString $certificate.Semaphore -replaceString $cert.Thumbprint + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Replace-StringInFile], ParameterBindingArgumentTransformationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,Replace-StringInFile Replace-StringInFile : Cannot process argument transformation on parameter 'replaceString'. Cannot convert value to type System.String. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:798 char:112 + ... th -findString $certificate.Semaphore -replaceString $cert.Thumbprint + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Replace-StringInFile], ParameterBindingArgumentTransformationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,Replace-StringInFile Replace-StringInFile : Cannot process argument transformation on parameter 'replaceString'. Cannot convert value to type System.String. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:799 char:120 + ... th -findString $certificate.Semaphore -replaceString $cert.Thumbprint + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Replace-StringInFile], ParameterBindingArgumentTransformationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,Replace-StringInFile Replace-StringInFile : Cannot process argument transformation on parameter 'replaceString'. Cannot convert value to type System.String. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:800 char:119 + ... th -findString $certificate.Semaphore -replaceString $cert.Thumbprint + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Replace-StringInFile], ParameterBindingArgumentTransformationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,Replace-StringInFile Replace-StringInFile : Cannot process argument transformation on parameter 'replaceString'. Cannot convert value to type System.String. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:801 char:127 + ... th -findString $certificate.Semaphore -replaceString $cert.Thumbprint + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Replace-StringInFile], ParameterBindingArgumentTransformationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,Replace-StringInFile Replace-StringInFile : Cannot process argument transformation on parameter 'replaceString'. Cannot convert value to type System.String. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:802 char:124 + ... th -findString $certificate.Semaphore -replaceString $cert.Thumbprint + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Replace-StringInFile], ParameterBindingArgumentTransformationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,Replace-StringInFile Replace-StringInFile : Cannot process argument transformation on parameter 'replaceString'. Cannot convert value to type System.String. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:803 char:119 + ... th -findString $certificate.Semaphore -replaceString $cert.Thumbprint + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Replace-StringInFile], ParameterBindingArgumentTransformationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,Replace-StringInFile Replace-StringInFile : Cannot process argument transformation on parameter 'replaceString'. Cannot convert value to type System.String. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:804 char:117 + ... th -findString $certificate.Semaphore -replaceString $cert.Thumbprint + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Replace-StringInFile], ParameterBindingArgumentTransformationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,Replace-StringInFile Replace-StringInFile : Cannot process argument transformation on parameter 'replaceString'. Cannot convert value to type System.String. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:805 char:117 + ... th -findString $certificate.Semaphore -replaceString $cert.Thumbprint + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Replace-StringInFile], ParameterBindingArgumentTransformationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,Replace-StringInFile Replace-StringInFile : Cannot process argument transformation on parameter 'replaceString'. Cannot convert value to type System.String. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:807 char:118 + ... th -findString $certificate.Semaphore -replaceString $cert.Thumbprint + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Replace-StringInFile], ParameterBindingArgumentTransformationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,Replace-StringInFile Replace-StringInFile : Cannot process argument transformation on parameter 'replaceString'. Cannot convert value to type System.String. At C:\DynamicsTools\CleanVHD\Build-Vhd.ps1:808 char:117 + ... th -findString $certificate.Semaphore -replaceString $cert.Thumbprint + ~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (:) [Replace-StringInFile], ParameterBindingArgumentTransformationException + FullyQualifiedErrorId : ParameterArgumentTransformationError,Replace-StringInFile very appraciate for your answer
Hi SmartCode! thank you very much! i had write the code as your vedio, and figout 90%promblem for my trouble. my point is now i cannot find my thumb code as before certificate >property>detail. now it is shows like certificate>property>general/croscertificates/ocsp/extendied validition. and i cannot import certificate either because the password is not right . could you please tell me waht command can i figure it out. very appriciate!!!
Hi! It sounds like you’re facing a couple of issues with your certificate. Thumbprint Not Found: If you can't find the thumbprint under Properties > Details, it could mean that the certificate isn't correctly imported or it might be in a different store. You can try running the following command to list all certificates and their thumbprints: Get-ChildItem -Path cert:\CurrentUser\My | Select-Object Thumbprint, Subject This will show you all the certificates in the Current User's certificate store, including their thumbprints. Password Issue for Importing Certificate: If the password is not working when you try to import the certificate, ensure that you are using the correct password that was set during the export. If you forgot the password, you won't be able to import the PFX file. Unfortunately, there's no way to recover the password for a PFX file. If you need to create a new certificate or export a new PFX file, ensure you set a secure password that you can remember. Please let me know if this helps or if you have any more questions!
@@learnsmartcoding Hi Smart coding:) many thanks for your kindly reply. it seems clear for me. first :the password which i had setup for pfx is only for the the certificate i had made. maybe there is some mistake. second: what i want figurout is make a SSL trusted certificate. now it seems the website for the company is not aviliable. so at last the private key is failed either. so i will try a gain as your vedio. a million of thanks
Hello! Could you please explain how, in DDD, business entities like Customer and Courier are related to User (the actual user of the application)? Since business entities do not store authentication information and only hold data for business logic, I’m still having trouble understanding this. :(
Hi! Great question-thanks for asking. In Domain-Driven Design (DDD), Customer and Courier are business entities focused on business rules, while User handles authentication. Here’s how they relate: Different Purposes: User stores login and permissions, while Customer and Courier handle business-specific data, like order history or delivery schedules. Link by ID: Instead of mixing login data into Customer or Courier, these entities can include a User ID field that links to the User entity. This way, we keep the roles separate but can still connect a user to their relevant business data. Example: When a customer logs in, the system uses the User ID to load their Customer info, keeping authentication and business data separate. In short, we link User to business entities like Customer by ID without mixing in login details, keeping everything clean and organized! Hope this helps clarify! 😊 Let me know if you have more questions on this topic. 😊
@@learnsmartcoding Thank you very much for your response! If possible, it would be great if you could make a video about DDD and Clean Architecture, and how to separate auth and business entities.
Sure, will add to my list
Hi Karthik, This complete course is really very useful because your way of explanation for all concept is very clear.
Thanks for your kind words. I'm glad you're finding the course helpful!
Thanks for the video. I have a question about your example. What is the benefit of the Identity Pass? All Alice needs is the resource in the library. What could be the advantage if she shares her identity?
Thank you for watching and for your question! In OAuth 2.0, access is often centered around resources. However, OpenID Connect (OIDC) adds an "identity layer" on top of OAuth 2.0, which can provide significant benefits in cases where user identity verification is important. In this example, let’s say Alice wants to access resources in a library. If she only had access to a specific resource without sharing her identity, the library wouldn’t know who accessed the resource-it would just know that "someone" with valid access did. By sharing her identity (through OIDC), several benefits come into play: Personalized Access: Alice’s identity can enable access to resources customized specifically for her, such as borrowing history or reserved items. Security and Auditing: Knowing who accessed what is critical for auditing and security. If Alice shares her identity, the library can track her activity and help prevent unauthorized access. Single Sign-On (SSO): With OIDC, Alice can use her identity across multiple services (e.g., multiple libraries or departments) without needing to sign in repeatedly. This is a key benefit in federated systems. Consent and Permissions: Identity sharing allows Alice to explicitly grant consent for specific uses, ensuring that her information is handled transparently and securely. So, while simply gaining resource access may seem like enough, identity sharing provides more robust user experiences, enhanced security, and auditing capabilities. This is why OIDC and OAuth 2.0 are often used together, especially for applications where identity verification is critical.
@learnsmartcoding got it. Really appreciate your explanation ❤️
ReactJs anytime soon?
@mansoorbepar Hi, thank you for your interest. Sure , let me plan for it.. will do it very soon in react js
Thanks buddy for considering. 😊
Thank you for the clear explanation, to-the-point discussion, and covering such an important topic.
I appreciate the feedback! Keep watching all the upcoming upcoming videos.
Thank you Karthik
You're welcome! Happy coding!
16:56 you're saying that we need to copy scopes from api app registration and put it in the scopes in the frontend but what i see is that you're not copy pasting and values are different there
Hi, Thank you for asking your questions. In the video, I show how to create and configure the values in .Net and Angular apps. My demo video had a completed, working application. Important steps are to know how to create an App Registration and configure its values to your apps. Hope this is clear and helps.
Thank you for the valuable video Sir
I'm glad you found it helpful!
Thank you Sir. !!! can u please bring more like scenario based question .
Hi Ajit, sure. I will make more such videos. How was this video content ?
@@learnsmartcoding Good covers most imp question