(CORE) CORE (2025)

Example of my small ASP.NET project (refactoring ASP.NET Classic project)

This is not very interesting case for me, because i've been doing the same boring routine since 2002. However, this is cool demonstration what is small freelance project what I done for a couple of days and small money.

So, Some customer get me ancient project what totally stop working in 2012 year and try to restart project again. I made this project, I revived this project, deployed it's to hosting, but after project started customer try to rebuild all pages for mobile phone and don't propose me related money to rebuild all pages, rewriting it from scratch, therefore I leaved this project after I have deployed updated project.



Project has about 22,000 code lines and 218 SQL objects.



This is project code I have changed.



While so many? Because ancient code totally expired.

(1) Firstly project ha global troubles and can not compiled as ASP.NET project.



(2) script for Google Analytic expired, and Analytics code is wrong. I move code to config and create new Analytics code.



(3) Script to working with Google reCapture totally expired. I receive new code and also pass it to configuration.



Unfortunately, working with captcha has more problem. All code was embed to compiled assembly, and that assembly has wrapper as ASP.NET control and Control exported public parameter, what need to manipulate from form code.



Unfortunately, that capture Google API totally expired and not supported since 2007 year.



And customer ask me replace Google captcha to own captcha, I made this change



This not was simple task without thinking, I have rebuilt control from statically bounded events to dynamically, and create new code to working with captcha.



(4) Code worked with Adobe Flash Player, what not working since 2008 year, I made this changing.



(5) Customer want to change jQuery from ancient version 1.4 to modern 3.4. This is also a question, because all methods changed during last 10 years

(6) Customer require exactly the same framework what he want 4.8.1, therefore I install exactly that framework to server and my computer. And change all configuration to use exactly the same framework and change VB.NET version (oldest VB.NET version for example don't support String Interpolation Syntax).



(7) Old mail server was totally shutdown and I said customer to full changed account to Brevo.



(8) Customer Require a lot of task in Database. (1) Rename it.



Compress it.



Reindex SQL database.



And trace various site features and changing various concrete data.



(9) Next step was a transfer domain to DNS user selected (https://www.time4vps.com/), select right server configuration and initialize VPS from scratch.



(10) So, VPS is ready to connect by RDP.



(11) Firstly, as usually, I disable fucking screensaver and install a lot of updates.



(12) Than, I have Install IIS, than configured IIS.



(13) Than I configured Firewall.



(14) Than I created and installed SSL certificate.



(15) Than installed and configured FTP server.



(16) Than I Installed MS SQL and tune SQL security.



(17) So, all mostly done, and I have installed other critical services I usually need, for example remote debugger.



(18) Deploy project and modify config with <customErrors mode="On"> to see potential errors clearly.



(19) Small interesting point in this installation was that (despite my login named "Administrator") in reality, in datacenter policy this was only as ordinary user account. Therefore I need create special configuration to SQL server. As usually, I have installed MS SMS to server, but in common case this is not mandatory.

Firstly, end-customer decide to install developer edition of SQL server to production server to avoid monthly payment to Microsoft, but this is not my deal.



About configuring MS SQL server. Firstly, I have configured remote access (datacenter has Firewall in webPanel, therefor is full safe.



Than we need to select account for SQL service and start SQL service in command line. But be careful, if SQL server failed - ErrorLog will still busy.



As usually, best security mode is mixed mode.



And main points, I forget take screenshots, but logic is there - you need to start server in command line, set server in single-user mode, than add this fucking account (what is not really Administrator because domain policy restrict it for ordinary user) and than switch server to multi-user mode. And restarting also is more usable in command line, because you can see clear errors. So:


    # net start MSSQLSERVER
    # net stop MSSQLSERVER
    # cd C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Binn>
    # sqlservr.exe -m
    

And main point - start server in command line and all this fucking restricted login

    # sqlcmd -S localhost -E
    # CREATE LOGIN [5FOF\Administrator] FROM WINDOWS;
    # ALTER SERVER ROLE sysadmin ADD MEMBER [5FOF\Administrator];
    # GO
    # ALTER DATABASE master SET MULTI_USER;
    # GO
    

After that you can connect with MS SMS and other task will more than bored. In this case customer require something changing in DB. Something like this, but in this case customer was kinds of idiots and changed his ideas what he really want many times.





So, this is example of most bored low-money job, what I doing maybe thousand times since 2002 year, I hope somebody has interest to this bored routines what I described in this page.




AspNetClassic context:



Comments ( )
Link to this page: http://www.vb-net.com/AspNetExample/Index.htm
< THANKS ME>