ASP.NET Web Forms website Part 1 – Connect with MySQL database connection



ASP.NET Web Forms website Part 1 – Connect with MySQL database connection

ASP.NET Web Forms website Part 1 - Connect with MySQL database connection

Please consider helping me provide new content by donating to my new Patreon account https://www.patreon.com/durancoding

ASP.NET Website creation example using some limited HTML, ASP.NET tags, C# code files, and connecting to a MySQL database.

Here I did a step by step demonstration on how to create a semi functional ASP.NET Website. There’s no heavy emphasis on HTML, there is no CSS, however I do show how to add textboxes, buttons to a web page and then tie the web application to MySQL Database for authentication.

If you want to see how to harden the Web Forms login page against SQL injection you can take a look at part 2 video: https://www.youtube.com/watch?v=glXvhwH_pwY

If you want to see how to use a slow hash function such as PBKDF2 salt/hash and have more input validation code then look at the part 3 video: https://www.youtube.com/watch?v=AR7_SHnptZc

Here’s a brief time table of contents of what’s happening in this video:
0 min – Brief verbal overview
1 min 20 sec – Creating new project and three aspx files.
4 min 50 sec – button, textbox creation using asp.net graphic objects.
11 min 50 – opened MySQL workbench, created database and table for website to connect to.
16 min – added MySQL.Data dll to project.
16 min 40 – add user/password to MySQL workbench.
20 min – create connection string in Web.Config file.
22 min 40 sec – update MySQL table for auto incremental feature.
24 min – created code for Registration aspx page.
30 min 40 sec – registration demo on the application/MySQL database .
33 min 30 sec – coded user login credentials in default aspx page.
40 min 30 sec – update user login aspx page.
42 min 10 sec – log in demo on application/MySQL database.

Update:
To encrypt the connectionString’s web.config file programmatically you can add this code:

Configuration config = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath);
ConfigurationSection section = config.GetSection(“connectionStrings”);
if (!section.SectionInformation.IsProtected)
{
section.SectionInformation.ProtectSection(“RsaProtectedConfigurationProvider”);
config.Save();
}

Comments are closed.