How do you get the IP address of the web/application server in .NET? Not the client IP address, but the server IP address.
I just found something about server variables.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You probably want something like the following code, to get all IP addresses of the current machine. However it won’t tell you which network adaptor (and thus IP address) a particular request came in on, if you have more than one.