Answer the question
In order to leave comments, you need to log in
Is it possible to write a backend in pure C#, like in PHP? Without involving frameworks?
I mean, is it possible to write an example of a landing page with a form to fill in the data, enter it into the database, get it from the database without involving the whole ASP.NET architecture?
First of all, I ask so that as a PHP back-end developer, I can learn C-sharp and try to create projects on the web without using frameworks for fun.
Answer the question
In order to leave comments, you need to log in
It is possible, but not necessary.
HttpListener listener = new HttpListener();
listener.Prefixes.Add ("http://localhost:51111/MyApp/"); // Listen on 51111
listener.Start();
Comparing PHP and C# is not correct.
1. PHP was originally made for the web
2. PHP is interpreted
3. Apache takes a lot of responsibility for processing the request.
C# development uses asp net core, which houses the kestrel web server, which takes care of the network and HTTP.
Basically, you can try to use CGI along with C#, but that's a bad idea.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question