G
Guest
Hi,
Sorry to double post this one, but I think it fits in this group.
Is there a way to get the client IP from a web service? I keep receiving the
server's IP address.
From my web method, I tried all of this:
Context.Request.UserHostAddress;
Context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
Context.Request.ServerVariables["REMOTE_ADDR"];
Even by checking the headers, there's no client IP:
NameValueCollection NVCSrvElements = Context.Request.ServerVariables;
foreach(string item in NVCSrvElements.Keys)
{
Response.Write(item + " " + NVCSrvElements[item]);
}
Any idea?
Thanks,
Stephane
Sorry to double post this one, but I think it fits in this group.
Is there a way to get the client IP from a web service? I keep receiving the
server's IP address.
From my web method, I tried all of this:
Context.Request.UserHostAddress;
Context.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
Context.Request.ServerVariables["REMOTE_ADDR"];
Even by checking the headers, there's no client IP:
NameValueCollection NVCSrvElements = Context.Request.ServerVariables;
foreach(string item in NVCSrvElements.Keys)
{
Response.Write(item + " " + NVCSrvElements[item]);
}
Any idea?
Thanks,
Stephane