문제

I want to configure a wildcard mapping for a specific path, and send the requests to a HttpHandler. My URLs look like this:

This configuration doesnt match the URLs above.

<location path="api/v1/conversation">
    <system.webServer>
        <handlers>
            <add name="ApiProxy" verb="*" path="*" preCondition="integratedMode" type="DemoProject.ApiProxy, DemoProject" />
        </handlers>
    </system.webServer>
</location>

It works when I add an extension to my URLs:

How do I make this work extension-less?

도움이 되었습니까?

해결책

It turned out, that this problem was related to my website was running Umbraco CMS. Umbraco CMS has an AppSetting called "umbracoReservedPaths", which asks Umbraco to ignore specific paths.

The value was set to:

<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />

After adding ~/api/, everything worked as expected:

<add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/api/" />
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top