What is an .axd file?

前端 未结 3 1930
故里飘歌
故里飘歌 2020-12-07 10:38

What kind of purpose do .axd files serve?

I know that it is used in the ASP.Net AJAX Toolkit and its controls. I\'d like to know more about it.

3条回答
  •  臣服心动
    2020-12-07 11:30

    Those are not files (they don't exist on disk) - they are just names under which some HTTP handlers are registered. Take a look at the web.config in .NET Framework's directory (e.g. C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\web.config):

    
      
        
          
          
          
          
          
          
        
      
    
    

    You can register your own handlers with a whatever.axd name in your application's web.config. While you can bind your handlers to whatever names you like, .axd has the upside of working on IIS6 out of the box by default (IIS6 passes requests for *.axd to the ASP.NET runtime by default). Using an arbitrary path for the handler, like Document.pdf (or really anything except ASP.NET-specific extensions), requires more configuration work. In IIS7 in integrated pipeline mode this is no longer a problem, as all requests are processed by the ASP.NET stack.

提交回复
热议问题