greg938d72 greg938d72 - 6 months ago 38 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")