Class Act

Back to the shelf

VB.net · Snippet · ASP.net

Local Host

VB.net code to check whether the application is running on the local machine (localhost).

Example

How to use Local Host:
Paste the code into the class or page, then call it from the method that needs the result.

Code

Dim isLocal as Boolean = HttpContext.Current.Request.IsLocal