.net - To get visitors IP address -


I would like to get the visitor's IP address.

Which is appropriate to use:

  request. The server ("REMOTE_ADDR")   

or

  request. UserHostress   

Which is the best way?

They are exactly the same UserHostAddress just call GetRemoteAddress .

  public string UserHostAddress {get {if (this._wr! = Null) {this._wr return GetRemoteAddress (); } Return tap; }} Public override string GetRemoteAddress () {return it back. GETServerVariable ("REMOTE_ADDR"); }   

Both also. Net Framework 1.0 / 1.1 are ahead

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -