How to check if localhost July 27, 2023 by Tarik As a comment has the correct solution I’m going to post it as an answer: HttpContext.Current.Request.IsLocal