WebResource.axd and ScriptResource.axd in ASP.NET

By | May 29, 2013
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInDigg thisPin on Pinterest
WebResource.axd and ScriptResource.axd are basically HTTP handlers in .NET Framework implementing IHttpHandler interface. Purpose of these HTTP handlers is to get the embedded resources inside an assembly.We can easily find the following HttpHandler entry in root configuration file:
<add path=”WebResource.axd” verb=”GET” type=”System.Web.Handlers.AssemblyResourceLoader” 
validate=”True”/>
WebResource.axd primarily focussing on embedded resources specifically web forms and validations scripts while ScriptResource.axd is more focussed on those scripts that have been registered with ScriptManager control.
ScriptResource.axd has some additional features:

  • Keeping different types of the same resource i.e. for debug and release.
  • Compress scripts for transfering over HTTP.
  • It can also be used for other frameworks as jQuery.
Hopefully, purpose of these resource files (webresource.axd and scriptresource.axd) will be more clear and understandable

Top 10 Interview Questions and Answers Series:

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInDigg thisPin on Pinterest
Category: Uncategorized

About IMRAN ABDUL GHANI

Imran Abdul Ghani is working as Software Developer(Senior) with extensive knowledge in Web development technologies especially C#, ASP.NET, MVC, WCF, Web API, ADO.NET Entity Framework, jQuery etc. He has several years of experience in designing/developing enterprise level applications. He is Microsoft Certified Solution Developer for .NET (MCSD.NET) since 2005. You can reach his blogging at www.webdevelopmenthelp.net, www.topwcftutorials.net, and www.sharepointfordummies.net.