This does the trick. It detects external ip address from outside the lan and internal ipaddress from inside the lan. And if the page is accessed from an external LAN with a matching ipaddress, it still returns the external one.
protected void Page_Load(object sender, EventArgs e) {
String thisipaddress = Request.UserHostAddress; <-----THIS
if (thisipaddress == "127.0.0.1" || strings.left(thisipaddress,7)=="192.168"){
hiddenarea.Visible = true;
} else {
hiddenarea.Visible = false;
}
}
CLICK HERE to find out more related problems solutions.