How to check in ASP.NET MVC View if site is running on localhost or 127.0.0.1?
@if (Request.IsLocal) { // do something }
or
<% if (Request.IsLocal) { // do something } %>