Last post Sep 22, 2009 10:45 AM by Peter Smith
Mar 29, 2008 01:18 PM|blove57|LINK
Is there a way to turn on wildcard mapping in IIS7 from the Web.config file? I have a .NET 3.5 website with a few C# HTTP Modules such as URL redirect scripts that required "Wildcard application maps" turned on for the .NET framework
(pointed to the same dll as what .aspx uses). Right now the website is running on IIS6 and did this thru the IIS6 management console. But now I've moved the website to a IIS7 shared hosting and now wanted to turn Wildcard application mapping via the Web.config
file. Is this possible? I don't have IIS7 console control since it's shared.
Apr 02, 2008 05:34 AM|Zhao Ji Ma - MSFT|LINK
Yes you can. By default, handlers are not allowed to be overridden in the web.config file. They are locked in the IIS 7 configuration, you need to unlock the section to allow overriding. Here is an example using appcmd.exe to unlock this section. The Command
Prompt was running as Administrator.
C:\Windows\System32\inetsrv>appcmd.exe unlock config /section:system.webserver/handlers
Here is an example of web.config file with managed type as the handler.
<?xml version="1.0" encoding="UTF-8"?>
<add name="WildCard" path="*" verb="*" type="sampletype" resourceType="Unspecified" />
You can also configure the handler in IIS7 Manager, please take care of the precedence of the handlers in the list in IIS7 Manager.
Sep 22, 2009 10:45 AM|Peter Smith|LINK
Your solution seems to be the one to go for. However after doing this I'm getting the error:
Could not load type ’sampletype’.
What are the correct type and resourceType values to use for a basic mapping of * to the UrlRewriter module?
Zhao Ji Ma - MSFT
please take care of the precedence of the handlers in the list in IIS7 Manager.
What is the correct order?