|
| Wildcard application maps in IIS7 from Web.config? |
 |
Sat, 29 Mar 2008 20:18:42 +000 |
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.
|
| Post Reply
|
| Re: Wildcard application maps in IIS7 from Web.config? |
 |
Wed, 2 Apr 2008 12:34:55 +0000 |
Hi blove57,
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"?>
<configuration>
<system.webServer>
<handlers>
<add name="WildCard" path="*"
verb="*" type="sampletype"
resourceType="Unspecified" />
</handlers>
</system.webServer>
</configuration>
You can also configure the handler in IIS7 Manager, please take care of the
precedence of the handlers in the list in IIS7 Manager.
|
| Post Reply
|
|
|
|
|
|
|
|
|
|