Can I use wildcards in the web.config location path attribute?

后端 未结 3 649
心在旅途
心在旅途 2020-12-19 00:50

In IIS 7 I try to deny access to all files with the extension .xml for all users.

I tried the following setting in my web.config file:



        
3条回答
  •  天涯浪人
    2020-12-19 01:05

    I have stumbled across this when searching for a way to change the security applied to all actions within a controller in a legacy application (ASP.NET MVC). I thought I need some sort of wildcard, but simply providing the path including the controller segment is enough:

    This allows anonymous access to all actions within FooController.

提交回复
热议问题