How to ban IP by ASP.NET

canadac57

canadac57

@canadac57-b4zljZ Oct 25, 2024

Hi All,

I develop an ASP.NET website for free users, they can post question without sign-up. How to get IP from client and block the spammers?


Thank you
#-Link-Snipped-#
_________________
_Jason Harding
#-Link-Snipped-#
<a href="https://nhakhoanhantam.com" target="_blank" rel="nofollow noopener noreferrer">Nha khoa Nhân Tâm - Địa chỉ Nha khoa uy tín đạt chuẩn quốc tế 2023</a>

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Manish Goyal

    Manish Goyal

    @manish-r2Hoep Jan 24, 2010

    Blocking of spammers i think tough job buddy.😉

  • canadac57

    canadac57

    @canadac57-b4zljZ Jan 24, 2010

    non-sensical answer

  • Manish Goyal

    Manish Goyal

    @manish-r2Hoep Jan 24, 2010

    sorry buddy i was just kidding.

    use the following code:



    Your IP address<%= Request.ServerVariables("REMOTE_ADDR") %>

    and for blocking spammers you have to use some kind of program or logic

    sorry for previous reply

  • canadac57

    canadac57

    @canadac57-b4zljZ Jan 25, 2010

    thank you i will try with your code
    But Your IP address<%= Request.ServerVariables("REMOTE_ADDR") %>
    does it mean to get the IP from Client?

  • Manish Goyal

    Manish Goyal

    @manish-r2Hoep Jan 25, 2010

    yes..
    It will retrieve Ip address of client.