I need to find out the external IP of the computer a C# application is running on.
In the application I have a connection (via .NET remoting) to a
Patrik's solution works for me!
I made one important change. In process message I set the CallContext
using this code:
// try to set the call context
LogicalCallContext lcc = (LogicalCallContext)requestMessage.Properties["__CallContext"];
if (lcc != null)
{
lcc.SetData("ClientIP", ipAddr);
}
This places the ip address in the correct CallContext, so it can later be retrieved with
GetClientIP()
.