> 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/