When a user request comes in, I can use Context.Request.UserHostAddress to get the user’s IP address. How can I get the IP address of the website/server at runtime? I have some reporting code that can be used by multiple websites on the same server, and each website uses a different IP address. So I need to be able to detect the website’s IP address at runtime.
When a user request comes in, I can use Context.Request.UserHostAddress to get the user’s
Share
Thanks Alex, your answer put me on the right path. Here is the code to do what I am looking for:
VB.NET:
or