Our ASP.NET website is hosted on a windows server 2008 and IIS7.
Recently we have a problem with "attacks" from certain IPs that generate a lot of errors by submitting different forms with invalid parameters.
I'd like to be able to block a list of IP addresses for 24hrs based on a list generated from the asp.net code. I know it is possible to achieve this using Web.config - ipSecurity Tag. I’ve found the following example:
http://www.dantor.com/support/misc/web-config-ip-address-restriction.aspx
The problem is that changing/updating the web.config will cause the website to restart/recycle.
Is it possible to update the blocked IP list without pool recycle?
EDIT:
Maybe a better idea would be to implement this using HttpModule - Scott Hanselman wrote a post on this subject in his blog: http://www.hanselman.com/blog/AnIPAddressBlockingHttpModuleForASPNETIn9Minutes.aspx
Do you think this is will cause a performance hit ? Routing all of websites requests through the httpmodule could have an effect in terms of page load time ? Any other idea of how to get this done ?
EDIT 2:
The website is protected by a Fortigate 200a firewall , but from my knowledge firewall isn't able to automatically block IP's that generate errors or try to do SQL injection.