Its crazy to me how this video has so made likes and so few dislikes when they are storing passwords as plain text. No reputable website would ever do this and you are compromising users private information.
Nice video, but you should create a service layer for the conection. Do not put database access on the controller. Views, Controllers, Services, Bussiness, Models
I tried this and it didn't work for me. I don't know how did you get the values from the form, I tried putting the "Verify" to the form action but it just gives me the error "the resource cannot be found"
@@christosskartsaris19You need to add [HttpPost] above the Verify Method and then on your Login View put "Verify ( or the name of your method)" in the action attritbute.
Wait how is this not throwing a 405 error on the browser when u enter credentials? Your razorview layout has a tag for form method: post (10:53), while you have a httpget modifier on your index method (the one that returns ur main view) am I missing something?
Hi, this video has been very helpful so far. I am stuck at 3:47, however, because I can't find the "WPF" subfolder in the "Databases" subfolder. Would you be able to help?
you can use Directory.GetCurrentDirectory() to get the current location then you can set the path to sub-folder and you can switch the directories in the same solution.
Even Done Everything As Per Video In Spite Facing Compile Error As Code No "CS1009" - "Unrecognize Escape Sequence Error" .. How To Remove It And Build It Successfully? Please Help Me..
@@CSharpCodeAcademy it's on AccountController dr=com.ExecuteReader. It say System.Data.SqlClient.SqlException: "Incorrect syntax near the keyword User"
Rule #1... never implement your own authentication and user management system! Problems with your system: - passwords get saved in database in plain text and are not handled properly (they should ALWAYS be hashed and salted) - Vulnerability to SQL injection attacks - Brute-Force attacks - No "Forgot password" - No Email confirmation - No 2FA - ... Use ."NET Identity" to handle/manage user accounts and link the responsive form to it! Your app looks good and everything and it is okay for demonstration purposes of the responsive form. But it is not safe to be deployed in a real-world scenario.
Good morning sir some problems will come with SQL server connection when we enter the user id and password and click login then it's redirect to accountcontroller.cs page .how to solve this problem.
did you mention the path in form attributes (asp-controller & asp-action)? if not then mention them and your page will be redirector to the correct controller and call the action method you mentioned.
Server Error in '/' Application. The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: / Any solution please
It seems you assign the wrong path, in the form tag use these two attributes asp-controller="YOUR Controller name" asp-action="Your Action Method Name"
Everything works fine if I run it from Login.cshtml, it log-in successfully. But if I run from routing and click on Sign In then it gives me below error: "Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. " Requested URL: /Verify
Finally I rectified this issue by myself. just need to change the RouteConfig.cs as below: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Routing; namespace EMAM { public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "SignIn", url: "Verify", defaults: new { controller = "Account", action = "Verify", id = UrlParameter.Optional } ); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Account", action = "Login", id = UrlParameter.Optional } );
Hello, This is my first project in asp.net mvc ever. And i'm at the end of the video and i wan't to click the login button. But i get a error it can't find the /account/Verify i can't find the solution on google, maybe you guys know it?
Hi, Just change RouteConfig.cs as below, and it will work fine. using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Routing; namespace EMAM { public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "SignIn", url: "Verify", defaults: new { controller = "Account", action = "Verify", id = UrlParameter.Optional } ); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Account", action = "Login", id = UrlParameter.Optional } );
Hello, excellent project, I have problems with public class AccountController : Controller, where ": Controller" line 11 gives me error cs0118 and I can not solve it, help please
Muchas Gracias me sirvió de mucho seria bueno si lo tradujeras al español saludos desde peru Thank you very much, it would be very good if you translated it into Spanish, greetings from Peru.
I have an idea for an online project and I need the help of programmers and experts so help me achieve my dream and I wish you with all my heart that dreams will come true God willing
Hello friend, I have followed exactly all your steps and everything works for me, but at the time of logging in I receive the error "Error connecting to the local database with.open () An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll Additional information: An instance-specific or network-related error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: named pipes provider, error: 40 - Could not open a connection to SQL Server) " Could you help me please
@@CSharpCodeAcademy That's right friend, I managed to fix the problem and it was that in the CommandText I had written "tbl_" and that was something from your login table and that was my mistake, thanks for your concern, a question how can I add more windows after having already I miss my login?
@@CSharpCodeAcademy Hey I had the same problem too. I couldn't make the server name totally correct because the code won't allow me to use backslash or I'd get an error but my server name uses a backslash. Is there any way to rename the server name or any code to accept a backslash so I can proceed?
Can someone please help mein with this error ? System.Data.SqlClient.SqlException: 'Cannot open database "WPF" requested by the login. The login failed. Login failed for user
please guys i need the sources to this please. i have tried multiple times and still didnt work. help me with the code let copy and check where am wrong
I appreciate you tried several times but as a matter of fact the video is 2+ years old and i don't have the source code. but I'll upload a new video with source code so stay tune.
New Tutorial Out on Asp .Net Core (MVC): th-cam.com/video/s3o8iuoDMyI/w-d-xo.html
code send me
For people following step by step, know that this is prone to sql injection.
Its crazy to me how this video has so made likes and so few dislikes when they are storing passwords as plain text. No reputable website would ever do this and you are compromising users private information.
@@dingoDogMan bruuuuh, it's not a tutorial how to encrypt password :D
@@benjaminasracas4525 it's not a tutorial at all. But a tutorial how to write a Hindu code
Well, then make a better video for us.
@@kennethvenzonmusic_ I do not have the time, just look up how to use sql parameters.
I actually had fun watching this video and didn't skip any part. thanks!
A
Nice video, but you should create a service layer for the conection. Do not put database access on the controller. Views, Controllers, Services, Bussiness, Models
thanks for your feedback, this is basic stuff for absolute beginners
@@CSharpCodeAcademy I was looking for exactly this type of Api.....thanks bro
I tried this and it didn't work for me. I don't know how did you get the values from the form, I tried putting the "Verify" to the form action but it just gives me the error "the resource cannot be found"
I have the exact same problem. after submitting the page it says /Verify page is not found. Can anyone help?
@@christosskartsaris19You need to add [HttpPost] above the Verify Method and then on your Login View put "Verify ( or the name of your method)" in the action attritbute.
@@justinlemuel12 the problem was the path of controller and view. I added asp-controller and asp-action in the form tag and it worked.
Glad this worked out for me. Quite straightforward video also very helpful. Amazing keep it up.
do you mind sharing the login template please
It was very helpful. thanks for creating video
Glad it was helpful!
Helal Kardeşim, gurur duydum. (En iyi Motivasyon Müzikleri'nden yakaladım:))
What an amazing video. Thank you
Very nice tutorial
Thank you! Cheers!
Ow-some and Straight Forward Video. This helped me about to get started with MVC 5. Now I can create login Form in MVC. Thanks
0:55 en iyi motivasyon müzikleri :)
Felt like it would be soo nice if there were an explaination given as a voice.
THANKS IT WORKED hope i can add more based on this project
Glad it helped
Can you show how to actually make the database? Otherwise great video!
Great Thanks. But why tik tok background music 😭
Don't know
Thank you so much. But i think instead of creating new view (create and error) we can use something like javascript tho?
Obviously, we can
i did not find the mvc5 layout page razor in my project?
@Tuğçe Beyhan try this => com.CommandText = "select from tbl_login where username = '"+acc.Name+"' and password = '"+acc.Password+"'";
Can u pls explain how to change the bg image ...becoz I don't need that
How do I get my login form to route to my Dashboard when the user logs in? I am having issues with that.
Amazing video! helped me a lot, Can you do a video for a registration form using postgresql ?!
Hi! Did you manage to do it with postgresql? If so, can you please share? It's urgent!
Great, I enjoyed every bit of this!
Glad you enjoyed it!
you are the fucking best ,you save my ass because i have a proyect in 1 week and i let my login for the final
backgrounc music a bop
Hey i tried to dowload that template but it was giving me thre pictures in part.
Is there anything here that stops the user just changing the URL themselves? Not exactly secure...
I'm watching full tutorial code with shoulder dance..
can you tell me what does integrated security do?
Thank you so much guys
From India🇮🇳
I appreciate it.
Where is your login button written at??? I don't see it in your Login.cshtml
Great work bro awesome video can you please do delete and update as well
Sure, I'll
what to do when using MySQl
Sir i need to learn how to build E-commerce website using bootstrap in mvc, i need your help please bring tutotrial on this
I'll try my best to publish asap.
Great Tutorial
thank you soo much for your help!! continue with this chanel please .... :)
sabir ali fine thanks! How about you?
sabir ali no , im from México 🇲🇽 jeje sorry
Wait how is this not throwing a 405 error on the browser when u enter credentials? Your razorview layout has a tag for form method: post (10:53), while you have a httpget modifier on your index method (the one that returns ur main view) am I missing something?
you're missing something and that is after POST request the controller generates Get request call, there are two requests one after another.
Hi, i have a problem in the end when i try to log in, when i put my username and password it says error, can you help? Thanks!
Hi, this video has been very helpful so far. I am stuck at 3:47, however, because I can't find the "WPF" subfolder in the "Databases" subfolder. Would you be able to help?
you can use Directory.GetCurrentDirectory() to get the current location then you can set the path to sub-folder and you can switch the directories in the same solution.
Here is Solution to get Subfolders using absolution path.
stackoverflow.com/questions/10668481/listing-only-subfolders-in-c/10668520
@@CSharpCodeAcademy Thanks! Yeah I figured out I would have to create the Database on my own, but I'm not sure what to put in the query window.
@@CSharpCodeAcademy Ah nevermind, I think I figured that out too, and to make the table as well. Thanks for the help, nonetheless!
Nice
How can I redirect from login to an index? after the user accepts?
Thank you so much!
Muchas gracias saludos desde El Salvador!
me alegra que lo hayas disfrutado
Even Done Everything As Per Video In Spite Facing Compile Error As Code No "CS1009" - "Unrecognize Escape Sequence Error" ..
How To Remove It And Build It Successfully? Please Help Me..
entering user name and password and after its showing on the next page cannot log into data base, i don't understand where did go wrong
I can't get my SQL to connect to this project. When I open up SQL Studio, I don't have WPF under databases
I hope you got the answer by yourself after 3 weeks, but just in case, you don't have it because that's his own database, you have to create your own.
can i please have the files for the template cause im struggling to get it from w3layouts thank you
Please give the route config part for giving controller name and action. For a reference.
Here you go
docs.microsoft.com/en-us/aspnet/core/mvc/views/working-with-forms?view=aspnetcore-6.0
i'm still stuck in the dr.comconnection that part, where my dr is higlighted in red...wonder whats the problem?
can you please let me know the exact time in the video where you stuck so I can help you more.
and dr.comconnection does'nt exist.
@@CSharpCodeAcademy it's on AccountController dr=com.ExecuteReader. It say System.Data.SqlClient.SqlException: "Incorrect syntax near the keyword User"
How to create direction session home page?
How to connect database..i created database in sql but if i login its showing error..can u please help
here you can find how to setup connection string 04:39
thank you very much for your beautiful video
I want you to give us the link of files in the video description...
i'll update the links for new videos in the description.
Rule #1... never implement your own authentication and user management system!
Problems with your system:
- passwords get saved in database in plain text and are not handled properly (they should ALWAYS be hashed and salted)
- Vulnerability to SQL injection attacks
- Brute-Force attacks
- No "Forgot password"
- No Email confirmation
- No 2FA
- ...
Use ."NET Identity" to handle/manage user accounts and link the responsive form to it!
Your app looks good and everything and it is okay for demonstration purposes of the responsive form. But it is not safe to be deployed in a real-world scenario.
nice
do u make video about register form?
Sure, i'll upload it so stay tuned.
Wao me sirvió mucho gracias !
That really fix my problems, thanks so mich! From México
Si te funciono
Good morning sir some problems will come with SQL server connection when we enter the user id and password and click login then it's redirect to accountcontroller.cs page .how to solve this problem.
did you mention the path in form attributes (asp-controller & asp-action)?
if not then mention them and your page will be redirector to the correct controller and call the action method you mentioned.
thank so much you video help me with my proyect
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /
Any solution please
It seems you assign the wrong path, in the form tag use these two attributes asp-controller="YOUR Controller name" asp-action="Your Action Method Name"
Can you give me background music name please :)
i am unable download template please guide me
Hey nice work ! from Taiwan
goooooood daaaaaamn thaaaaank you sooooooooooo much
im absolute beginner can I use entity framework code first to make the queries?
Sure, you can use
Greetings from Peru
Everything works fine if I run it from Login.cshtml, it log-in successfully.
But if I run from routing and click on Sign In then it gives me below error:
"Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
"
Requested URL: /Verify
Finally I rectified this issue by myself. just need to change the RouteConfig.cs as below:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace EMAM
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "SignIn",
url: "Verify",
defaults: new { controller = "Account", action = "Verify", id = UrlParameter.Optional }
);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Account", action = "Login", id = UrlParameter.Optional }
);
}
}
}
@@aamirsarfaraz3004 after doing theses changes i'm still facing this error.
Nice tutorial. Great job! Can you please send me the code?
Excuse me, my server name has (\) and it occur error in ConnectionString. what should i do?
it can't be an issue.
try @"connection string" instead " ", use @ sign before " "
@@CSharpCodeAcademy
Thank u so much
How can you for example go from /Account/Login to for example /Dashboard?
Nice video btw!
use asp link to go
This how to make user dashboard
it's so unhandy that you dont show the functionality of the login button. How do I connect the Verify method with the login method? please help
follow the instructions carefully ...
Great Video!!!
tks for this tutorial video :D It saves my day!
Glad to hear that!
I did it and it was working properlly but now its says Unable to cast object of type 'System.Int32' to type 'System.String'. :/
Make sure you are using the correct Datatype.
Hello, This is my first project in asp.net mvc ever.
And i'm at the end of the video and i wan't to click the login button. But i get a error it can't find the /account/Verify
i can't find the solution on google, maybe you guys know it?
send me screenshots including error + C# code + front-end, then i'll able to assist you.
Hi, Just change RouteConfig.cs as below, and it will work fine.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace EMAM
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
name: "SignIn",
url: "Verify",
defaults: new { controller = "Account", action = "Verify", id = UrlParameter.Optional }
);
routes.MapRoute(
name: "Default",
url: "{controller}/{action}/{id}",
defaults: new { controller = "Account", action = "Login", id = UrlParameter.Optional }
);
}
}
}
need help in implementing the same for signup page.
I got the server error in / application . how to fix it ? Plz help me to fix this
try this =>
Thank you so much
You're most welcome
help me... Error de servidor en la aplicación '/'.
No se encuentra el recurso.
intente agregar atributos a su formulario =>
help me do not connect the database urgently!!!!!!!!!!!!! thanks
Thanks
Can you give the code, please?!
Server Error in '/' Application.
The resource cannot be found.
Requested URL: /Verify
please help me
try to add attributes to your form =>
@@CSharpCodeAcademy great! thank you so much :)
Hello, excellent project, I have problems with public class AccountController : Controller, where ": Controller" line 11 gives me error cs0118 and I can not solve it, help please
please make sure the namespace and controller class names must be different,
You'll get more details there => check out the link: docs.microsoft.com/en-us/dotnet/csharp/misc/cs0118
Bro can you please a layout template link that you used in this video
w3layouts.com/template/spin-login-form-flat-responsive-widget-template/
Muchas Gracias me sirvió de mucho seria bueno si lo tradujeras al español saludos desde peru
Thank you very much, it would be very good if you translated it into Spanish, greetings from Peru.
I've opened contribution for you so you can add subtitles by yourself. so other Spanish can easily understand.
suiiii
This is token based authentication ?
No, it's a basic login tutorial.
please share the code of html,css used in this
I have an idea for an online project and I need the help of programmers and experts so help me achieve my dream and I wish you with all my heart that dreams will come true God willing
Ping me on channel email
Merhaba ben login sayfasını oluşturdum şimdi session işlemi yapmak istiyorum yönlendirebilir misiniz?
Microsoft belgelerindeki bu makaleye göz atın => docs.microsoft.com/en-us/aspnet/core/fundamentals/app-state?view=aspnetcore-5.0
Hey nice work btw! Can I have the Code please?
Thankyou Soo much
DataBase????
Nice video. But cant download the login template!!!
you can try other templates.
hi i have one doudt for create alogin page
let me know how i can help you?
Hello friend, I have followed exactly all your steps and everything works for me, but at the time of logging in I receive the error "Error connecting to the local database with.open ()
An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll
Additional information: An instance-specific or network-related error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: named pipes provider, error: 40 - Could not open a connection to SQL Server) "
Could you help me please
Make sure your connection string is correct.
Error will be resolved automatically.
@@CSharpCodeAcademy
That's right friend, I managed to fix the problem and it was that in the CommandText I had written "tbl_" and that was something from your login table and that was my mistake, thanks for your concern, a question how can I add more windows after having already I miss my login?
understand & follow MVC structure.
@@CSharpCodeAcademy Hey I had the same problem too. I couldn't make the server name totally correct because the code won't allow me to use backslash or I'd get an error but my server name uses a backslash. Is there any way to rename the server name or any code to accept a backslash so I can proceed?
If i enter username and password,it shows 1error in con.Open().how to clear that error
try this code snippet
if(con.ConnectionState == ConnectionState.Open){
con.Close();
}
con.Open();
hey its not taking images...
Make sure to enter valid path
I'm using mvc with entity framework, but I can't apply de css to all the views.
Someone can help me?
you need to link the css file to _Layout.cshtml file [ inside the shared folder ]
@@CSharpCodeAcademy Thank u so much! that worked for me!
Can someone please help mein with this error ? System.Data.SqlClient.SqlException: 'Cannot open database "WPF" requested by the login. The login failed.
Login failed for user
It seems either the user is invalid or you entered the wrong credentials.
please guys i need the sources to this please. i have tried multiple times and still didnt work. help me with the code let copy and check where am wrong
I appreciate you tried several times but as a matter of fact the video is 2+ years old and i don't have the source code. but I'll upload a new video with source code so stay tune.