"how do you change the extension that .net pages will run under?" Code Answer

3

in iis, when you create the application for the virtual directory, click on "configuration" for the application, and edit "app mappings", i.e. add a new mapping for html.

or, in your web.config, in add this sections:

<httphandlers>
   <remove verb="*" path="*.html" />
   <add verb="*" path="*.html" type="system.web.ui.pagehandlerfactory" />
</httphandlers>
<compilation>
   <buildproviders>
       <buildprovider 
           extension=".html" 
           type="system.web.compilation.pagebuildprovider" />
   </buildproviders>
</compilation>

edit: added the section, according to the comment. thanks chris.

By gopalkrizna on May 22 2022

Answers related to “how do you change the extension that .net pages will run under?”

Only authorized users can answer the Search term. Please sign in first, or register a free account.