M
M
maxemga2021-06-13 16:56:19
ASP.NET
maxemga, 2021-06-13 16:56:19

How does the server on ASP.net work?

I’m starting to work with .NET after NodeJS express for the backend and I don’t understand, in NodeJS Express you start the server (in parallel with the client, if it’s a React application for example) and to do some manipulation on the server you write a router and on the client at this address you send a request, and the server performs its function (that is, only requests are sent to the server, but it does not route html pages, etc.), but in ASP.NET, as I understand it, everything works differently and the server is responsible for rendering HTML pages, font images? It’s just that my brain after Express doesn’t understand how it works and whether I think it’s right, everything is completely different.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2021-06-13
@maxemga

Like any other
1. a server instance starts, which configures everything and prepares for listening
2. a port is opened
3. at the time of the request, a chain of middleware handlers is called
4. the request is completed
by ASP.net, in general, it is big. there are Forms there are components that have a state and, roughly speaking, encode their state in hidden fields. Now it’s something to start on it, well, so-so
ASP.net MVC here is pure rendering of components with some sugar, see Razor
ASP.net api just api draw the client side as you want
However, everything can be combined

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question