Hello Alberto,
The neat way is to use "HttpContext.Request.IsLocal", it incapsulate checks
for the 127.0.0.1
---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
AP> "Frank" <franknews@advitronic.nl> wrote in message
AP> news:133uc2ceebjpq5c@corp.supernews.com...
AP>
>> is there a way to determine someone is locally accessing the webpages
>> (localhost\index.aspx) in an ASP.NET environment? As opposed to from
>> a remote place (ie. 555.123.3.45\index.aspx).
AP> You can examine Request.UserHostAddress which will be set to
AP> 127.0.0.1 if the page is accessed from the localhost.
AP>
Alberto Poblacion - 07 May 2007 16:14 GMT
> Hello Alberto,
>
> The neat way is to use "HttpContext.Request.IsLocal", it incapsulate
> checks for the 127.0.0.1
Thanks, I didn't know that one.
Thanks Alberto,
looks like a good solution.
Frank
>> is there a way to determine someone is locally accessing the webpages
>> (localhost\index.aspx) in an ASP.NET environment? As opposed to from a
>> remote place (ie. 555.123.3.45\index.aspx).
>
> You can examine Request.UserHostAddress which will be set to 127.0.0.1
> if the page is accessed from the localhost.