Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

Control Certain IP

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Husam - 09 Sep 2007 07:38 GMT
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
Mark Rae [MVP] - 09 Sep 2007 09:07 GMT
> My question Is how can I control or track any Ip of computer and prevent
> it
[quoted text clipped - 10 lines]
>
> 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.CompleteRequest();
       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...

Signature

Mark Rae
ASP.NET MVP
http://www.markrae.net

Alexey Smirnov - 09 Sep 2007 13:37 GMT
> > My question Is how can I control or track any Ip of computer and prevent
> > it
[quoted text clipped - 38 lines]
> 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/dedicated/IIS/blockip/

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.