PC Review


Reply
Thread Tools Rate Thread

determine local access

 
 
Frank
Guest
Posts: n/a
 
      7th May 2007
Hello,
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).

Thank you
Frank


 
Reply With Quote
 
 
 
 
Alberto Poblacion
Guest
Posts: n/a
 
      7th May 2007
"Frank" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.


 
Reply With Quote
 
Michael Nemtsev
Guest
Posts: n/a
 
      7th May 2007
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" <(E-Mail Removed)> wrote in message
AP> news:(E-Mail Removed)...
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>


 
Reply With Quote
 
Frank
Guest
Posts: n/a
 
      7th May 2007
Thanks Alberto,
looks like a good solution.
Frank
"Alberto Poblacion" <earthling-(E-Mail Removed)> wrote
in message news:(E-Mail Removed)...
> "Frank" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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.
>
>



 
Reply With Quote
 
Alberto Poblacion
Guest
Posts: n/a
 
      7th May 2007
"Michael Nemtsev" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine if Local User is in Local Group orp Microsoft C# .NET 1 10th Apr 2006 06:14 PM
How to determine whether a local user has a password? yxq Microsoft VB .NET 1 5th May 2005 10:04 AM
How does IE determine which addresses are local...? Sean Levesque Windows XP Internet Explorer 0 12th Mar 2004 03:49 PM
How to determine the name of local computer Danny Microsoft Access VBA Modules 2 15th Jan 2004 09:02 PM
How does IE determine whether a url is local or external? Keith Windows XP Internet Explorer 0 9th Oct 2003 09:58 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:54 PM.