Showing posts with label clientsusing. Show all posts
Showing posts with label clientsusing. Show all posts

Saturday, March 31, 2012

Web Server IP

Is there a simple way to obtain the IIS Server IP address (not the clients
using) with C# in ASP.NET? Our web servers are simple with only one IP. In
Classic ASP there was a one liner that would give it to you in a string
format...."Michael @. SGMS" <MichaelSGMS@.discussions.microsoft.comwrote in message
news:0E5480A1-7EF2-4838-9A32-E18E984A1231@.microsoft.com...

Quote:

Originally Posted by

Is there a simple way to obtain the IIS Server IP address (not the clients
using) with C# in ASP.NET? Our web servers are simple with only one IP.
In
Classic ASP there was a one liner that would give it to you in a string
format....


HttpContext.Current.Request.ServerVariables["LOCAL_ADDR"].ToString();