How do you block ip address?

How to block IP address or IP classes in ASP.NET

FinalDestiny at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

If what you mean by "block" is "don't let them harass my server", this is not an asp.net issue, you need a firewall (software or hardware). If what you mean by "block" is "don't show my pages": ' pseudocode, I haven't checked the exact syntax Sub Page_Load() If HttpRequest.UserHostAddress = "123.123.123.1" then Response.Redirect "404.htm" ' send them elsewhere end if End Sub

egrunin

you mention you are not familiarized with the ASP.NET, so, maybe this excelent article from http://www.west-wind.com can help you as it as a full article on how to block IP's and even have an admin area to manage them... http://www.west-wind.com/WebLog/posts/59731.aspx

balexandre

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.