Web Server IP

G

Guest

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.....
 
M

Mark Rae

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();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top