greg938d72 greg938d72 - 8 months ago 47 Question

How do I get a user's ip address with .NET code?

How do I get a user's IP address with .NET code? I'm using Foo Basic Web Studio IDE that uses code.


Here is the way you can that IP address of users.

string clientIp = Request.ServerVariables("HTTP_X_FORWARDED_FOR");

       clientIp = Request.ServerVariables("REMOTE_ADDR")