In fact, the extension ashx is basically the same as axd. It is used to write web handler and can be used to call the IHttpHandler class. the control parsing and page processing process of the aspx page.
The only difference is that the axd extension must be registered in Therefore, in the Add file of the project, the wizard only adds the template of the ashx file, but does not add the template of the axd file. Why is it that Microsoft is so bored with two suffixes that it is not enough to use all of ashx? Neat and neat. It turns out that if your web handler code is not in the Web project, you cannot use ashx because it is not in the web project. if it is registered in config, the system does not know which dll library to find the corresponding code.
For example:
<Add verb = "*" path = "OpenSearch. axd "type =" Company. components. httpHandler. openSearchHandler, (namespace. class Name) Company. extensions (. dll file name) "validate =" false "/>
Only after registration, the web will know that OpenSearch. axd was originally in Company. Extensions. dll and processed using the Company. Components. HttpHandler. OpenSearchHandler class.
Of course, you just need to set up <add verb = "*" path = "OpenSearch. ashx" type =... that's not a problem, so it's just a habit.
In webconfig, the write principle is that iis will first handle the. axd file, and then hand it to FreeTextBoxControls. AssemblyResourceHandler, the class named FreeTextBox for processing instead of letting aspnet process it.
However, your server provider may remove the asping from. axd to aspnet_isapi.dll for security reasons, so you will be wrong when running on the server. The only thing you can do now is to contact your server provider to restore the ing.
Extension:. axd
Execution file: C: \ WINDOWS \ Microsoft. NET \ Framework \ v1.1.4322 \ aspnet_isapi.dll
Restrictions: GET, HEAD, POST, DEBUG
Script Engine check
There is a default ing in IIS on the server: ing *. axd to aspnet_isapi.dll.
From Crazy Coding life of Heda Li Xin