473,472 Members | 1,727 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

determine local access

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
May 7 '07 #1
4 1642
"Frank" <fr*******@advitronic.nlwrote in message
news:13*************@corp.supernews.com...
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.
May 7 '07 #2
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" <fr*******@advitronic.nlwrote in message
APnews:13*************@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).
APYou can examine Request.UserHostAddress which will be set to
AP127.0.0.1 if the page is accessed from the localhost.
AP>
May 7 '07 #3
Thanks Alberto,
looks like a good solution.
Frank
"Alberto Poblacion" <ea******************************@poblacion.orgwro te
in message news:eE**************@TK2MSFTNGP05.phx.gbl...
"Frank" <fr*******@advitronic.nlwrote in message
news:13*************@corp.supernews.com...
>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.


May 7 '07 #4
"Michael Nemtsev" <ne*****@msn.comwrote in message
news:a2***************************@msnews.microsof t.com...
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.
May 7 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Peter Schmiedeskamp | last post by:
Hello, I'm writing a python program (in Windows) from which I would like to determine whether or not either: 1. The user has administrative access on the current PC. or (better) 2. The currently...
4
by: anketm | last post by:
I am writing a simple client using UDP sockets. I am wondering if there is any way to determine what local port a socket was bound to when bind() is not explicitly called. This is what my...
8
by: Steven Van Dyke | last post by:
Hi I need a code snippet to determine if my computer is connected to a network or not. There's probably a System.Net function for it, but I cannot find it. Thanks, Steve
2
by: robert d via AccessMonster.com | last post by:
I need to determine for sure if a particular fie is on the user's local PC or on the server. I have the complete path of the file, let's call it FullFilePath How can I unequivocally determine...
1
by: orp | last post by:
We've been struggling on how to determine if a local user is already in a local group. We have code (C#) that creates a local user, if the user doesn't already exist. And, we have code (C#) that...
11
by: CJM | last post by:
I need to be able to determine if the user is a member of a given AD group. I have a method of doing this, but it is not suitable for 64bit OS's, so I need to find an alternative route. I actually...
8
by: rdemyan via AccessMonster.com | last post by:
Anyone have any ideas on how to determine when the back-end file (containing only tables) has been updated with new data. The date/time of the file won't work because it gets updated to the...
8
by: rmorvay | last post by:
I need to know if there is a way to determine the amount of RAM that a person has on their workstation from a web application. We are using BrowserHawk to mine HTTP information but I also need to...
10
by: John Brown | last post by:
Hi there, Does anyone know how to (generically) determine the currently active form for an application using a "static" function (so I can call it from anywhere). There is no offiical way I've...
2
by: kirk | last post by:
I'd like to programmatically be able to determine if a network interface is currently in "Local Only" or "Local and Internet" access mode. Also I wasn't sure if this is only applicable to Windows...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.