Page view counter

Wildcard application maps in IIS7 from Web.config?

Last post 04-02-2008 5:34 AM by Zhao Ji Ma - MSFT. 1 replies.

Sort Posts:

  • Wildcard application maps in IIS7 from Web.config?

    03-29-2008, 1:18 PM
    • Loading...
    • blove57
    • Joined on 11-16-2007, 11:48 PM
    • Posts 21
    • Points 0

    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.

  • Re: Wildcard application maps in IIS7 from Web.config?

    04-02-2008, 5:34 AM
    Answer

    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.

    Zhao Ji Ma
    Sincerely,
    Microsoft Online Community Support

    “Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
Page 1 of 1 (2 items)