How to detect when request from local computer (server)

  • Thread starter Thread starter Rafael Leonhardt
  • Start date Start date
R

Rafael Leonhardt

How I can to detect when a user access a site from the server?
I need to control someting like "remoteonly" on custom errors in my aspx to
show some information when local and other wen remote.
 
use Request.ServerVariables;
and retrieve the HTTP_HOST server variable.
if it is localhost, then the use is accessing the site from the server.

syntax would be like so:
Request.ServerVariables["HTTP_HOST"];
 
Back
Top