Prevent static file handler from intercepting filename-like URL

后端 未结 2 1831
醉话见心
醉话见心 2021-01-04 05:30

In my web application I have a route which looks like this:

routeCollection.MapRoute(
    \"AdfsMetadata\",                    


        
2条回答
  •  太阳男子
    2021-01-04 06:27

    Add the following to the section of the node:

    
    

    This instructs IIS that GET requests to the specified url should be handled by the managed pipeline and not considered as static files and served by IIS directly.

    I have a custom ControllerFactory which needs the full class name (AdfsController instead of Adfs), so the suffix Controller is correct in this case.

    Double check this please. Try with and without the Controller suffix in the route definition.

提交回复
热议问题