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


how user's ip address .net code? i'm using foo basic web studio ide uses asp.net code.

here way can ip address of users.

string clientip = request.servervariables("http_x_forwarded_for");  if(string.isnullorempty(clientip))        clientip = request.servervariables("remote_addr") 

Comments

Popular posts from this blog

c++11 - Intel compiler and "cannot have an in-class initializer" when using constexpr -

rest - Spring boot: Request method 'PUT' not supported -

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -