Skip to content

Instantly share code, notes, and snippets.

@mikeplate
Created October 3, 2013 11:50
Show Gist options
  • Select an option

  • Save mikeplate/6808586 to your computer and use it in GitHub Desktop.

Select an option

Save mikeplate/6808586 to your computer and use it in GitHub Desktop.
Parts extracted from web.config in order to map .js file extension as an ordinary aspx page
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation>
<buildProviders>
<remove extension=".js"/>
<add extension=".js" type="System.Web.Compilation.PageBuildProvider" />
</buildProviders>
</compilation>
</system.web>
<system.webServer>
<handlers>
<add name="JavaScript" path="*.js" verb="GET" type="System.Web.UI.PageHandlerFactory" />
</handlers>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment