Where is WebResource.axd

后端 未结 1 1293
梦毁少年i
梦毁少年i 2020-12-28 15:53

I am looking for the file WebResource.axd (to see its source code) but I can\'t find it.
Where is it?

相关标签:
1条回答
  • 2020-12-28 16:01

    .axd files are typically implemented as HTTP Handlers. They don't exist as an ASP.NET web page, but rather as a class that implements the IHttpHandler interface.

    If you look in the root Web.config (%WINDIR%\Microsoft.NET\Framework\version\Config\Web.config) you'll find the following entry:

    <add path="WebResource.axd" verb="GET" type="System.Web.Handlers.AssemblyResourceLoader" validate="True" />
    

    This entry says, "Hey, if a request comes in for WebResource.axd then use the HTTP Handler AssemblyResourceLoader in the System.Web.Handlers namespace.

    The code for this class is a bit lengthy, so I can't post it here, but you can use a disassembler like the free Reflector to view this class's source code. You could probably get the original source code (with comments) by using the NetMassDownloader tool.

    0 讨论(0)
提交回复
热议问题