Products » Knowledge Base » Url Master 

Url Master Help Wiki

Switching off page extensions in IIS

Switching off page extensions in IIS is a process whereby the 'normal' process of IIS mapping a particular file extension to a set 'handler' in IIS is augmented by having all requests mapped to a particular handler. How this is acheived, and the effects of the change are different in the various versions of IIS that are in common use.


With IIS6, the wildcard mapping overrides all the other file handler mappings. As such, all of the requests for all resources on the particular website (or virtual directory) are passed to the designated handler of the wildcard request. In practice, with DNN, you will map the wildcard extension to the ASP.NET runtime. This means that ASP.NET will process requests for all images, html files, js files as well as all the regular ASP.NET requests. The impact of this depends on many things, including the amount of traffic, the size of the memory and processors on the server, and the amount of 'other' files. When ASP.NET receives a request for a file that isn't a specific ASP.NET type (ie, not a .aspx page) then it just processes the file and sends the results to the requesting browser - in this way it is no different from the standard ISAPI handler for the .html, .jpg, etc files, but it is generally acknowledged there is some memory/performance overhead with doing so. I have never seen a conclusive study done on this, so it's up to the individual as to what the effect is, and whether it is worth it. Because the ASP.NET runtime cannot cache the static files (.htm, .jpg etc) the server will have to read and output these files each time. In the case of this site, it runs on a low-end virtual machine and performance is considered to be adequate for most visitors. This is something that should be tested and verified on a case-by-case basis. For most relatively low-traffic sites, it's not likely to cause a problem.

IIS7 Classic

IIS7 Classic differs from IIS6 in some ways, but is closer to the IIS6 behaviour than the IIS7 integrated pipeline mode. IIS7 Classic mode stills handles ASP.NET requests via an ISAPI handler, but they can be configured directly in the web.config file for the website/virtual directory. In addition, the handlers for various handlers are defined in an ordered list, so that any match with a particular handler will mean a matching extension is matched and handled, rather than all requests going through the ASP.NET handler.

IIS7 Integrated Pipeline

The Integrated Pipeline is the native mode for IIS7, and represents a new way of handling requests for IIS. This means that greater control over the 'no extension' requests, as they can be handled by http modules (the Url Master module is a http module) without having to force all static files (.htm, .jpg, etc) to be run through the ASP.NET runtime. The existing static file handler remains in place, however, all file requests will be processed through whichever http modules are configured in your application.

Configuring your IIS site to run without Page Extensions

IIS 5.0 - Windows XP

  • open property page for website / virtual directory.

  • click the ''configuration'' button, select the ''mappings'' tab

  • click on the ''add'' button

  • Enter the details:
    • Executable = []\framework\[ver]\aspnet_isapi.dll (normally at c:\windows\\framework\v2.0.50727\aspnet_isapi.dll)

    • For no page extension -> Extension = .*

    • For custom page extension -> Extension = .{your value}


    • Script Engine :checked

    • Check that file exists : unchecked


  • Click OK, OK, OK to close and apply changes.


IIS 6.0 - Windows 2003 Server

  • open property page for website / virtual directory.

  • click the 'home directory' tab

  • click the 'configuration' button, select the 'mappings' tab

  • click 'insert' next to the 'Wildcard application maps' section

  • browse to the aspnet_isapi.dll (normally at c:\windows\\framework\v2.0.50727\aspnet_isapi.dll)

  • Ensure that 'check that file exists' is unchecked

  • Click OK, OK, OK to close and apply changes


IIS 7.0 Classic mode - Windows 2008 Server / Vista / Windows 7

Before following these instructions, take the time to check that your site is in fact running under 'Classic Mode' in IIS7. This can be checked by either looking at whether:

- your website is using the 'Classic .Net AppPool' Application Pool (Website Advanced Settings)

- your website is using another App Pool, and that App Pool is set to 'Classic' in the 'Managed Pipeline Mode'. This setting is under the 'Advanced Settings' dialogue for the Application Pool, under 'Application Pools'.

You can do this either through the IIS interface, or you can do it directly in your web.config file. Use whichever method suits.   Note there are differences between websites running in 64 bit mode and 32 bit mode (if you have a 64 bit server).  You can look at the settings in the application pool to determine if it is 32 or 64 bit - see application pool advanced settings, under the property 'Enable 32 bit applications'.  If this value is FALSE then the application pool, and website, is running in 64 bit.

Via the IIS interface:

  • open the website panel by clicking on the website/virtual directory in the IIS 'Sites' tree view. You should see a series of icons under the headings of 'ASP.NET' (.Net Authorization, .NET Compilation, .NET Error Pages etc), and 'IIS' (Authenticaion, Compression, Default Document, etc...)

  • open the 'Handler Mappings' section under the 'IIS' settings by double clicking on the icon. 

  • For 32 bit websites : click on the 'Add Script Map' link on the Right hand side. When the dialog opens, enter '*' in Request Path, click the '...' button and browse to the location of the 'aspnet_isapi.dll' file. This is normally at c:\windows\\framework\v2.0.50727\aspnet_isapi.dll). Type 'Wildcard Script Map' as the Name.
  • For 64 bit websites : click on the 'Add Script Map' link on the Right hand side. When the dialog opens, enter '*' in Request Path, click the '...' button and browse to the location of the 'aspnet_isapi.dll' file. This is normally at c:\windows\\framework64\v2.0.50727\aspnet_isapi.dll). Type 'Wildcard Script Map' as the Name.

  • Click OK, then click 'Yes' to the confirmation dialog asking about Do you want to allow this 'ISAPI Extension'

  • on the 'Handler Mappings' page, click on 'View Ordered List'. This converts the view to show where in the hierarchy the wildcard script map is located.

  • Ensure the 'Wildcard Script Map' is located higher on the list than the 'StaticFile' handler. This is done by clicking on the 'Widlcard Script Map' entry and clicking the 'Move Down' link. Repeat this until the entry is lower than the 'StaticFile' handler.  Generally the 'Wildcard Script Map' should be located one position above the Static File handler.


Note that for some reason, sometimes you will have to repeat the changing of the module order twice. I don't know why this is : other people have reported the same issue. So I suggest exiting the 'ordered list' mode, and re-entering it to check that your changes have committed correctly. If you don't have the order correct, when looking at your website, you'll see that none of the 'static' files (css, js, gif, jpg, etc) have worked, and most likely the format will be messed up.

Via the web.config file:

  • open the web.config file for your site in a text editor, and find the '<handlers>' section, under the <system.webserver> entry
  • add the appropriate entry at the bottom of the list of handlers for your site.  This will change on what version of .NET and operating system you are running (ie v2.0 and 32 bit, v4.0 and 64 bit, or whichever combination is needed)

    32 Bit Version 2.0

                <add name="v20 32 bit Wildcard Script Map" path="*" verb="*" 
                resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" 
                responseBufferLimit="4194304" />

    64 Bit Version 2.0

    <add name="v20 64 bit wildcard handler" responsebufferlimit="4194304" 
                        precondition="classicMode,runtimeVersionv2.0,bitness64" allowpathinfo="false" 
                        requireaccess="Script" resourcetype="Unspecified" 
                        modules="IsapiModule" type="" verb="*" path="*" />

    32 Bit Version 4.0

    <add name="v40 32 bit wildcard handler" path="*" verb="*" modules="IsapiModule" 
                        resourceType="Unspecified" requireAccess="None" 
                        preCondition="classicMode,runtimeVersionv4.0,bitness32" />

    64 Bit Version 4.0

                <add name="v40 64 bit Wildcard Script Map" path="*" verb="*" 
                resourceType="Unspecified" requireAccess="None" 
                preCondition="classicMode,runtimeVersionv4.0,bitness64" />
  • Change any values that vary for your installation, such as the path to the aspnet_isapi.dll
  • Save your web.config file

If you're having trouble with the web.config method, try using the IIS management console method, and then note the changes to the web.config.  In some cases, this might insert the entire list of ASP.NET related handlers into the list.  You'll know if it is a problem if the 'wildcard script map' shows up at the top of the ordered list. 

IIS 7.0 Integrated Pipeline mode - Windows 2008 Server / Vista / Windows 7

Note : if you are using 'Integrated Pipeline Mode', you can just select the 'No Page Extensions' option and apply the changes within the module. This will enable extensions for you.

However, If you would like to change the setting manually follow these instructions:

  • open the web.config file for your site in a text editor, and find the '[modules]' section under the '[system.webserver]' section

  • add in a new attribute for 'modules', so that it says [modules runallmanagedmodulesforallrequests="true"]. The 'runAllManagedModulesForAllRequests' attribute may not exist, or it may exist and you just have to change the value from 'false' to 'true'
  • save the web.config file


After you have applied the wildcard mapping to your site, thoroughly test your site to make sure it is still working in all respects.


 |  View Topic History  |