473,804 Members | 2,998 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1328
"Husam" <Hu***@discussi ons.microsoft.c omwrote in message
news:77******** *************** ***********@mic rosoft.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_Beg inRequest(objec t sender, EventArgs e)
{
if (HttpContext.Cu rrent.Request.S erverVariables["REMOTE_ADD R"] ==
10.0.0.17)
{
HttpContext.Cur rent.Response.S tatusCode = 404;
HttpContext.Cur rent.Response.S uppressContent = true;
HttpContext.Cur rent.Applicatio nInstance.Compl eteRequest();
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...@markNOSPA Mrae.netwrote:
"Husam" <Hu...@discussi ons.microsoft.c omwrote in message

news:77******** *************** ***********@mic rosoft.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_Beg inRequest(objec t sender, EventArgs e)
{
if (HttpContext.Cu rrent.Request.S erverVariables["REMOTE_ADD R"] ==
10.0.0.17)
{
HttpContext.Cur rent.Response.S tatusCode = 404;
HttpContext.Cur rent.Response.S uppressContent = true;
HttpContext.Cur rent.Applicatio nInstance.Compl eteRequest();
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
18285
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 display the number of times a certain value appears in a certain field (i.e. perform a ‘count'). I will be doing this for many values in many fields so do not wish to have scores of queries to build my report.
6
11305
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" Src="WebControls/Header.ascx" %> The web user control contains the following server controls
7
2876
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 can have the validator just disable certain control's postback and other part of page continue their functionality. Thanks,
2
1915
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' + '<%# (string)DataBinder.Eval(Container.DataItem, "ParcelID") %>' + PropType1 I think part of the problem is that intially there is no data bound to this repeater section. The data doesn't get built until the user clicks a button on the form and then...
3
2272
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 itself are dynamically created controls. I create as follows: wcGroupControl oGroupControl = new wcGroupControl(); I then tried calling methods of the control passing dynamic controls as parameters that need to be added to the web controls on the...
2
1638
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 to keep it, so I have to reload it on each postback 2. How do I display raw xml data? My control displays data with a stylesheet fine XmlDocument doc = new XmlDocument() doc.LoadXml (xml) XslTransform trans = new XslTransform() trans.Load...
4
1757
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 specific process is done,, but the form which will host the user control has to specify what has to be done Something like this , if the event is fired it should call the event in
7
3021
by: Shimon Sim | last post by:
I have a custom composite control I have following property
15
4783
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 button will verify the information that has been entered and updates the data base if the data is correct. Update will throw an exception if the data is not validate based on some given rules. I also have a custom error handling page to show the...
10
2371
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 top border. Is it possible to have more than 1 style at the same level (parent node) when using a SiteMap? I want it to appear something like this and I can only find a way to either have the border on all root nodes or none at all. In...
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10332
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10321
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6853
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5522
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4300
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 we have to send another system
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.