473,322 Members | 1,314 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Control Certain IP

Hi EveryBody:

My question Is how can I control or track any Ip of computer and prevent it
from entering web site either by domain name or ite IP address

For example:

If my computer IP is 10.0.0.117 and Domain name for site is www.yahoo.com
and its relevent IP address id for example 84.34.55.213 how can I control the
first IP to not enter a second IP ?

is there any way to do so...

any help will be or redirection will be appreciated

regard's

Husam
Sep 9 '07 #1
2 1315
"Husam" <Hu***@discussions.microsoft.comwrote in message
news:77**********************************@microsof t.com...
My question Is how can I control or track any Ip of computer and prevent
it
from entering web site either by domain name or ite IP address

For example:

If my computer IP is 10.0.0.117 and Domain name for site is www.yahoo.com
and its relevent IP address id for example 84.34.55.213 how can I control
the
first IP to not enter a second IP ?

is there any way to do so...

any help will be or redirection will be appreciated
Firstly, you've posted in an ASP.NET newsgroup, so I presume you're asking
about how to prevent a computer with a certain IP address from entering a
site which you are developing - you certainly can't prevent a computer from
navigating away from your site and going to www.yahoo.com, at least, not
through ASP.NET...

You could do something like this in Global.asax:

void Application_BeginRequest(object sender, EventArgs e)
{
if (HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] ==
10.0.0.17)
{
HttpContext.Current.Response.StatusCode = 404;
HttpContext.Current.Response.SuppressContent = true;
HttpContext.Current.ApplicationInstance.CompleteRe quest();
return;
}
}

This might be OK for a closed intranet application, but would be no use at
all for the live Internet because it's so easy to spoof an IP address...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Sep 9 '07 #2
On Sep 9, 10:07 am, "Mark Rae [MVP]" <m...@markNOSPAMrae.netwrote:
"Husam" <Hu...@discussions.microsoft.comwrote in message

news:77**********************************@microsof t.com...
My question Is how can I control or track any Ip of computer and prevent
it
from entering web site either by domain name or ite IP address
For example:
If my computer IP is 10.0.0.117 and Domain name for site iswww.yahoo.com
and its relevent IP address id for example 84.34.55.213 how can I control
the
first IP to not enter a second IP ?
is there any way to do so...
any help will be or redirection will be appreciated

Firstly, you've posted in an ASP.NET newsgroup, so I presume you're asking
about how to prevent a computer with a certain IP address from entering a
site which you are developing - you certainly can't prevent a computer from
navigating away from your site and going towww.yahoo.com, at least, not
through ASP.NET...

You could do something like this in Global.asax:

void Application_BeginRequest(object sender, EventArgs e)
{
if (HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"] ==
10.0.0.17)
{
HttpContext.Current.Response.StatusCode = 404;
HttpContext.Current.Response.SuppressContent = true;
HttpContext.Current.ApplicationInstance.CompleteRe quest();
return;
}

}

This might be OK for a closed intranet application, but would be no use at
all for the live Internet because it's so easy to spoof an IP address...

--
Mark Rae
ASP.NET MVPhttp://www.markrae.net
Husam,

in addition, you can also block an IP address in IIS
http://www.hostmysite.com/support/de...d/IIS/blockip/

Sep 9 '07 #3

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

Similar topics

5
by: Cro | last post by:
Hello Access Developers, I'd like to know if it is possible to perform a count in an expression that defines a control source. My report is based on a query. In my report, I want a text box to...
6
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header"...
7
by: A.M | last post by:
Hi, I have a validation control in my page that upon any invalid data, it disables all buttons in the page. basicly i don't have any postback in the page if the validator finds any error. How...
2
by: John Holmes | last post by:
I am using radioButton controls in a data repeater and would like to incorporate the 'key' field into the 'id' attribute of the radioButton controls and name them something like: 'rad' + '<%#...
3
by: Eric | last post by:
I have built a composite user web control that I want to create dynamically. The form will contain a variable number of these controls and as well some of the contents of the user web control...
2
by: Stan | last post by:
I could not find the answers for these two questions about in Xml server control 1. Is it possible for control to keep its ViewState? Even if I set EnableViewState = true the control does not seem...
4
by: thomson | last post by:
Hi all, i do have a user control with 4 buttons, and all the events are firing properly, My problem is that i need to right an event handler in the user control, which gets fired after a...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
10
by: p3t3r | last post by:
I have a treeview sourced from a SiteMap. I want to use 2 different CSS styles for the root level nodes. The topmost root node should not have a top border, all the other root nodes should have a...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.