Thank you very much for tutorials. In this video you left the authorize attribute on the controller so we couldn't see if the change in the startup class was worked. Thank you again!
Hi Venkat, I am big fan of your teaching. You're truly gifted. Thanks for all the efforts you put in to make these videos. Would you make series on Identiryserver4 and also, Microservices (with Ocelot gateway) ? Thanks once again.
Thanks for the explanation. I am new to web dev and I have one question in mind. How does the [Authorize] or the ASP know that the user is now authorized? In the video, there is a login method which makes the user authorized. But how? How does the login make someone authorized?
Hi, when you use Authorize attribute on Home/Create action method .. How does the program know it has to redirect you to the Login view without been especified?
When you use the extension method AddIdentity() in your ConfigureServices method of startup class, by default the login path is hard coded to access account/login implicitly(see line number 53 github.com/dotnet/aspnetcore/blob/1f76cce14ac4e4698a554b65a24f28000b50396e/src/Identity/Core/src/IdentityServiceCollectionExtensions.cs). However if you wish to redirect to other page(or you have your login page other than Account/Login) , you can configure it explicitly within your startup.
@kudvenkat I am using windows authentication in an intranet application. I have followed your tutorial, but I want only certain users or only one group to create edit and delete. How can that be done. Looking for your reply.
Does Authorize checks for the token of the user ? I think this is the only way, to check the user. I'm guessing is maintaining a sessions between a front-end and back-end.
How does Asp.Net Core know which Controller/Action to route the incoming request to when Authorize attribute is applied? How is it automatically able to determine the Account/Login action method for logging in?
Hi Venkat.. I'm a huge fan of you.. your explanation makes everyone feels to be a professional software engineer with your wonderful playlists Please do us a favour of staring ReactJS Tutorials too in your style of explanation.. Thanks in advance
Hi Venkat, How it is redirecting to Login Screen when you click on Create or Edit buttons after decorating the actions with Authorize attribute. Can you please let me know where this code is written. As in the start up page it is mentioned the default route Home --> Index. For me after clicking on Edit and Create buttons it is redirecting to Error view.
Somebody who understood on how we get redirected to login route, without any configuration, pls let me know, as I am confused on how the application knows that when it sees an [Authorize] filter then it has to redirect to what method ? (there must be some configuration or convention by which it is kicking in the login action method). thanks!!
Where did we configure the URL to login page to which the application redirects if not authorized? If it is default value for login URL, where can we configure it?
I figure it out. When you set service.AddIdentity its has been automaticly set to open method which has [AllowAnonymous]. If login is only method with it then it will open login page
@@jayasantosh9787 I think source code line 53 on this page is the answer: github.com/dotnet/aspnetcore/blob/1f76cce14ac4e4698a554b65a24f28000b50396e/src/Identity/Core/src/IdentityServiceCollectionExtensions.cs But I have not worked out how to set a different login page.
How The [Authorize] know that if user not login which redirect login page? For more Clear for what I need How it know AccountController And Login Action?
Hi asamara add this code in yout start up services.ConfigureApplicationCookie(options => { options.Events = new CookieAuthenticationEvents { OnRedirectToLogin = x => { x.Response.Redirect("Account/Login"); return Task.CompletedTask; } }; });
@@AbPoonamhi Hi Poonam, Is the controller handing your Account/Users called "AccountController"? The default route is "/Account/Login" I believe and if you have named your controller differently this might cause an issue? You can set a custom redirect path using the following method in the ConfigureServices method in Startup.cs: services.ConfigureApplicationCookie(options => { options.LoginPath = "/Controller/Action"; }); Hope this is of help!
I love the way you explain your the best teacher
.
can you make tutorial especially deducted for DOM Manipulation as much as possible
Caught up on all the videos in this playlist, by far the best on here. Thank you and will anticipate the rest of the upcoming videos. thanks again.
Thank you very much for tutorials.
In this video you left the authorize attribute on the controller so we couldn't see if the change in the startup class was worked.
Thank you again!
It works even if you remove that.
@@naodagere8210 it had to be removed in this lesson as soon as AuthorizeFilter added inConfigureServices
Hi Venkat, I am big fan of your teaching. You're truly gifted. Thanks for all the efforts you put in to make these videos. Would you make series on Identiryserver4 and also, Microservices (with Ocelot gateway) ? Thanks once again.
Don't forget to apply [AllowAnonymous] attribute on the Error Controller!
Hi venkat, will there also be a playlist about building API's with ASP.NET Core Web Api ? Thanks.
if you got good one please help me
The course is perfect .. im following this .. just i hope you can add video how to use and watching Sass with asp.net core
hi there Venkat Please post a video on (SSO)Single Sign on with ASP.net core
Thanks for the explanation. I am new to web dev and I have one question in mind. How does the [Authorize] or the ASP know that the user is now authorized? In the video, there is a login method which makes the user authorized. But how? How does the login make someone authorized?
That's the part that's missing it seems. I came here looking for the same thing.
Hi, when you use Authorize attribute on Home/Create action method .. How does the program know it has to redirect you to the Login view without been especified?
1+
services.ConfigureApplicationCookie(options => options.LoginPath = "/Account/LogIn");
When you use the extension method AddIdentity() in your ConfigureServices method of startup class, by default the login path is hard coded to access account/login implicitly(see line number 53 github.com/dotnet/aspnetcore/blob/1f76cce14ac4e4698a554b65a24f28000b50396e/src/Identity/Core/src/IdentityServiceCollectionExtensions.cs). However if you wish to redirect to other page(or you have your login page other than Account/Login) , you can configure it explicitly within your startup.
Hi Venkat! Thank you for all hard work that you have been doing for us. Just request, please do 2-3 videos per day.
Thank you very much for your amazing explination!
Thank you for wonderful tutorial. Pls upload part 72. We need more tuts from you.
Thank you for the detailed explanation!
@kudvenkat I am using windows authentication in an intranet application. I have followed your tutorial, but I want only certain users or only one group to create edit and delete. How can that be done. Looking for your reply.
Does Authorize checks for the token of the user ? I think this is the only way, to check the user. I'm guessing is maintaining a sessions between a front-end and back-end.
How does Asp.Net Core know which Controller/Action to route the incoming request to when Authorize attribute is applied? How is it automatically able to determine the Account/Login action method for logging in?
Same question
Hi Venkat.. I'm a huge fan of you.. your explanation makes everyone feels to be a professional software engineer with your wonderful playlists
Please do us a favour of staring ReactJS Tutorials too in your style of explanation.. Thanks in advance
great brother!!!!
Hi Venkat, How it is redirecting to Login Screen when you click on Create or Edit buttons after decorating the actions with Authorize attribute. Can you please let me know where this code is written. As in the start up page it is mentioned the default route Home --> Index. For me after clicking on Edit and Create buttons it is redirecting to Error view.
dear i have same issue ,did you find it ?, kindly help me.
a little bit confusing I hope that will be clear after watching the rest of videos thanks a lot
Thank you so much for this. Is there a way to add specific authorization if the authenticated user has a certain attribute
Thanks for your information. Most useful!
Do i implement this in the MVC project or Web Api project if i had to use it?
Great
Somebody who understood on how we get redirected to login route, without any configuration, pls let me know, as I am confused on how the application knows that when it sees an [Authorize] filter then it has to redirect to what method ? (there must be some configuration or convention by which it is kicking in the login action method).
thanks!!
Hi Sir , done all CRUD
operation except Delete ? can u please help me with this .
it doesn't redirect me to login page as you demonstrated. anyone encounter this?
Where did we configure the URL to login page to which the application redirects if not authorized? If it is default value for login URL, where can we configure it?
same question
@@nikhilvardhantawania4591 Did you solve this? I have figured it out.
@@adedechrisgone4792 yes
I did it by adding service.loginpath in startup.cs
Dear Venkat,
How authorize attribute redirects user to login page without any setting or code ? pls any one comment it.
I follow all the step according to your video but when I login as admin and go to the edit it redirect me to login again. Is there any solution?
Hello ,
When a method is not decorated with [Authorize], how does our application know to redirect to the login page?
Thanks
i missed video where you made redirects to login ... can anyone help me here how to add it. Thanks
I figure it out. When you set service.AddIdentity its has been automaticly set to open method which has [AllowAnonymous]. If login is only method with it then it will open login page
Sir please tell us about jQuery from validation.
Hi sir big fan
xD
How to configure Authorization globally in Asp.net Core 3 ?
How can you generate accountcontroller?
How does .Net core know where the login page is? Just by looking for an action called "Login" within all the controllers?
same here, please can you explain if your issues is resolved
@@jayasantosh9787 I think source code line 53 on this page is the answer:
github.com/dotnet/aspnetcore/blob/1f76cce14ac4e4698a554b65a24f28000b50396e/src/Identity/Core/src/IdentityServiceCollectionExtensions.cs
But I have not worked out how to set a different login page.
How it is redirect to login page on click of edit button
I don't really understand how ASP.NET Core knows that /Account/Login is where the user can enter his login details
I added Authorize attribute and made login and unable to access to Authorize views. I am using Core 3.2
In startup.cs add this line : app.UseAuthorization(); after app.UseAuthentication
For .net core v3.1+, app.UseAuthorization() must be between app.UseRouting() and app.UseEndpoints() in Startup.cs.
How The [Authorize] know that if user not login which redirect login page?
For more Clear for what I need
How it know AccountController And Login Action?
How authorize attribute knows where is login page? Is this default Account/Login?
if you get answer please tel me
Can u make a video on mvc login page?? plzz reply sir
my application is not redirecting me to a login page but it gives 401(unauthorized) error.
please help me fix this.
Hi asamara
add this code in yout start up
services.ConfigureApplicationCookie(options =>
{
options.Events = new CookieAuthenticationEvents
{
OnRedirectToLogin = x =>
{
x.Response.Redirect("Account/Login");
return Task.CompletedTask;
}
};
});
@@enanobap After adding above code, still unable to redirect to Login Page. Help Needed.. Thanks in Advance.
@@AbPoonamhi Hi Poonam,
Is the controller handing your Account/Users called "AccountController"? The default route is "/Account/Login" I believe and if you have named your controller differently this might cause an issue? You can set a custom redirect path using the following method in the ConfigureServices method in Startup.cs:
services.ConfigureApplicationCookie(options =>
{
options.LoginPath = "/Controller/Action";
});
Hope this is of help!
@@AbPoonamhi Apply AllowAnonymous attribute to Both Login Action methods.
Have you added these middleware in your configure method??
app.UseAuthentication();
app.UseAuthorization();
app.UseEndpoints(endpoints =>.........
ReturnUrl is not binding. Help ?
is source code available ?
Do you have an Udemy Course, if not you should have one, can become rich!!!!