Hi all, found the problem
For some reason in the IIS logs all the requests are in IPv4 format, but the local requests which come from "::1"
So using if (HttpContext.Current.Request.UserHostAddress.ToString() == "::1") works, only requests from the local machine are processed.
I don't understand why HttpContext.Current.Request.IsLocal doesn't work, it should look for ::1. Maybe I forgot to convert to string, anyway the above works :)