I am using ASP.NET MVC 4 and want to support dots in URLs. So I added the following configuration to web.config
as other Q/A's suggested:
<system.webServer>
<handlers>
<add name="ApiURIs-ISAPI-Integrated-4.0"
path="/user/*"
verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS"
type="System.Web.Handlers.TransferRequestHandler"
preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
Now I want to enable this for more than one paths, how can I do it?
Things I've tried:
Joining paths with comma or semicolon, not working, i.e.
path="/user/*,/event/*"
path="/user/*;/event/*"
If I add more <add>
tags each for a path, I get an error saying 'Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'ApiURIs-ISAPI-Integrated-4.0'.
If I simply add '*' to the path, it causes problem with the script and css resolution, which I haven't figured out why. But before debugging into that I want to first find out if specifying multiple paths is possible.
From my experiments it appears that the name attribute is simply a unique identifier, so can be any unique key. Try this:-
<system.webServer>
<handlers>
<add name="ApiURIs-ISAPI-Integrated-4.0_1"
path="/user/*"
verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS"
type="System.Web.Handlers.TransferRequestHandler"
preCondition="integratedMode,runtimeVersionv4.0" />
<add name="ApiURIs-ISAPI-Integrated-4.0_2"
path="/event/*"
verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS"
type="System.Web.Handlers.TransferRequestHandler"
preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
</system.webServer>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With