Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the differences between files with the suffix ashx and axd

Shulou Source: shulou.com Published: 2022-06-03 06:57:24 11月15日 Update

This article introduces the relevant knowledge of "what is the difference between ashx and axd files". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The only difference is that the axd extension must be registered in web.config, while ashx can be added directly in the project as aspx.

So in the add file of the project, the wizard only adds a template for the ashx file, not a template for the axd file. Then why is Microsoft so boring to create two suffixes, all using ashx on it? come straight to the point without the slightest hesitation. It turns out that if your web handler code is not in the Web project, then you can't use ashx, because if you don't register in web.config, the system doesn't know which dll library to find the corresponding code in.

Such as:

Only when registered does web know that OpenSearch.axd is originally in Company.Extensions.dll and is handled by the Company.Components.HttpHandler.OpenSearchHandler class.

Of course you do.

Tags: Files servers services suffixes projects processing code content only that is extensions providers more templates knowledge different neat practical secure boring Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple MariaDB macOS Redmi Linux