1

I am trying to use Dynamic IP Restriction for IP based request Throttling in ASP.NET, all the requests to my server are getting throttled as per "denyByRequestRate" element attribute specified in web.config. Now I want to exclude certain paths from being throttled (eg. "/Content" folder which contains all the static .js and .css files).

I tried having a separate child web.config for the "/Content" sub-directory to override the action. As per the accepted answer mentioned here. But it doesn't work.

Also tried using "location" element in web.config to use "denyByRequestRate" for certain locations but that also doesn't work.

Is there any way this can be achieved?

Avinash
  • 11
  • 1
  • Did you create an webapplication in IIS for /content? because only adding the web.config is not enough. – rene Jun 18 '17 at 07:41
  • The [documentation](https://www.iis.net/configreference/system.webserver/security/dynamicipsecurity/denybyrequestrate) says "The element is configured at the server or site level." – Sir Rufo Jun 18 '17 at 07:46
  • Possible duplicate of [IIS Dynamic IP restrictions in web.config location](https://stackoverflow.com/questions/40238717/iis-dynamic-ip-restrictions-in-web-config-location) – Sir Rufo Jun 18 '17 at 07:48
  • @rene i am publishing the website on azure (webapp) hence adding the "/Content" virtual directory on azure portal as mentioned [link] https://stackoverflow.com/questions/15115290/add-virtual-directory-to-existing-website-on-azure. Does this seems correct? – Avinash Jun 18 '17 at 07:53
  • did you tick the application box? – rene Jun 18 '17 at 07:55
  • @SirRufo so you mean it is not possible to achieve this as it happens at the server level and yes it is the duplicate of the above question, I mentioned above the accepted answer doesn't seems to work. – Avinash Jun 18 '17 at 07:56
  • @rene yes i ticked the application box. – Avinash Jun 18 '17 at 07:56

0 Answers0