I wrote a small web server as a sample in this thread but ended up getting a bit carried away and adding a bunch of stuff to it. I decided to release it as a teaching tool since it gives a bit of insight into how web servers actually work. It shows how 404 errors, favicons, redirects and downloads work, among other things.
Please note that this is not the way you want to build a real website. If you want to build a real web site or web app it is best to do so with the technologies that were made for it like ASP.Net or Blazor. This project is for demonstration and learning purposes, not for building real websites.
You will need Visual Studio 2019 and .Net 5 to open and compile this project.
The following video demonstrates the web server in operation, executed on both Windows 10 and Ubunto 20.4:-
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber
I wrote a small web server as a sample in this thread but ended up getting a bit carried away and adding a bunch of stuff to it. I decided to release it as a teaching tool since it gives a bit of insight into how web servers actually work. It shows how 404 errors, favicons, redirects and downloads work, among other things.
Please note that this is not the way you want to build a real website. If you want to build a real web site or web app it is best to do so with the technologies that were made for it like ASP.Net or Blazor. This project is for demonstration and learning purposes, not for building real websites.
You will need Visual Studio 2019 and .Net 5 to open and compile this project.
The following video demonstrates the web server in operation, executed on both Windows 10 and Ubunto 20.4:-
Is it possible to return actual web pages with form and process them upon POST request?
Programming is all about good logic. Spend more time here
Is it possible to return actual web pages with form and process them upon POST request?
Of course you can. It is a real web server in every sense of the word. It's just a skeleton implementation without all the bells and whistles of a production quality web server. POST functionality can be added to it.
C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter
There's just no reason to use garbage like InputBox. - jmcilhinney
The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber