As far as I understand, Request.IsLocal returns true in two scenarios. If the IP address of the request originator is 127.0.0.1, or if the IP address of the request is the same as the server's IP address.
I'm using this on a page which is regularly called by a cron task (using an absolute URL). Unfortunately this cron job is run on the same server as the page, meaning that IsLocal always returns true.
Ideally, I need a function which will just return true if I'm on localhost. How can I do this in a ASP.NET MVC environment?