A brief analysis of the file difference between the suffix ashx and axd _ Practical skills

Source: Internet
Author: User
The only difference is that the Axd extension must be registered in the So in the project's Add file, the wizard only adds the template for the ashx file, not the Axd file. Why is Microsoft so boring to do two suffixes, all use ashx not just do? Crisp It turns out that if your Web handler code isn't in a Web project, you can't use ashx, because if you don't register in web.config, the system doesn't know where to find the code in that DLL library.
Such as:
<add verb= "*" path= "Opensearch.axd" type= "Company.Components.HttpHandler.OpenSearchHandler, (namespace. Class name) company.extensions (. dll file name) "Validate=" false/>
Only register, the Web knows Opensearch.axd originally is in Company.Extensions.dll, use Company.Components.HttpHandler.OpenSearchHandler class processing.
Of course you get a <add verb= "*" path= "Opensearch.ashx" type= .... That's not the norm.
The principle in Webconfig is, first of all, IIS will axd the file handle, and then give it to Freetextboxcontrols.assemblyresourcehandler, Freetextbox this named class to handle rather than let the ASPNET handle it.
But your server provider may have removed the mapping of the. Axd to the Aspnet_isapi.dll for security reasons, so you're running the wrong server. The only thing you can do now is to contact your server provider and have them restore this mapping.
Extension:. axd
Execution file: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll
Limit to: Get,head,post,debug
Script Engine Tick
There is a default mapping in the server's IIS: Mapping *.axd to Aspnet_isapi.dll.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.