Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

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

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report