Scenario: You want to lock down access to a particular action or entire controller in your MVC application via the users IP address. This can be particularly useful if you would like to restrict the Admin portion of your website to just your company’s IP address range.
There are several ways to accomplish this task. IIS allows you to restrict by IP Address but what if you want to do it programmatically…