Asp.net programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this Asp.net and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Asp.net Website by URL, How to Play YouTube Videos in Asp.net by using Jquery , Jquery Change div background on mouseover in asp.net , JQuery UI Datepicker (Calendar) etc.

Tuesday, November 19, 2013

How to get Server IP in asp.net

How to get Server IP:



we can get the server Ip address in over Asp.net web site .
by code.friend it's very simple .here we wright code of asp.net you put it in page load and get ..........


  • Response.Write(Request.UserHostAddress.ToString() + "<br>");
  • Response.Write(HttpContext.Current.Request.UserHostAddress.ToString() + "<br>");
  • Response.Write(HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString() + "<br>");
  • Response.Write(HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString() + "<br>");

here UserHostAddress have property for Ip address.


Other Asp.net Related Post:



No comments:

Post a Comment