I am looking for the file WebResource.axd
(to see its source code) but I can't find it.
Where is it?
Asked
Active
Viewed 3.6k times
1 Answers
48
.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.

Scott Mitchell
- 8,659
- 3
- 55
- 71
-
7I posted more information about WebResource.axd and its purpose on my blog @ http://scottonwriting.net/sowblog/archive/2010/10/28/just-where-is-webresource-axd.aspx – Scott Mitchell Oct 28 '10 at 18:28
-
I understand that WebResource.axd is a HTTPHandler as is ScriptResource.axd. What, basicly, is the difference as they seem to do the same functionality. – David Williams Oct 28 '10 at 19:34
-
1@David Williams: I don't know for sure. Keep in mind that WebResource.axd was introduced in .NET 2.0. IIRC, the ScriptResource.axd was added for the ASP.NET AJAX Framework, which was initially developer for 2.0, but after 2.0 shipped. My guess is that when developing ASP.NET AJAX Microsoft realized there was some functionality they needed that was not part of WebResource.axd, so they created a new handler to give them the functionality needed for ASP.NET AJAX. That is my guess; to get a definitive answer you'd need to talk with someone at Microsoft. – Scott Mitchell Oct 28 '10 at 21:21