In ASP. net, when the client requests An ASPX page, that is, when a GET/POST request is sent to the server, the IIS server uses a series of steps to parse the request step by step, finally, the class of the requested aspx will be located, and the class will be parsed into HTML content and sent back to the client. When we use this path, the model server of aspx-related control processing has a set of established processes. To facilitate our customization of this processing process, Asp. NET provides a method for directly processing HTTP requests, that is, using the HTTP handler class. In simple terms, it is a ashx page. In vs IDE, it is called generic handler.
We can directly request an ashx page, and the server can accept and process it. You only need to enter the file name in the address bar of the browser. This is the same as the normal ASPX page.
Especially when Ajax is used for asynchronous processing of requests, the method of ashx is more straightforward and less troublesome to deal. This probably seems to be the meaning of its existence.