Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Get the client IP not the proxy's

Reply
Thread Tools

Get the client IP not the proxy's

 
 
Stephane
Guest
Posts: n/a
 
      11-09-2006
Hi,

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


 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      11-10-2006
"Stephane" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> 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?


Yes. Sorry, it can't be done.

John


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cisco VPN client OK - Checkpoint VPN client not OK Ned Cisco 0 10-12-2007 01:02 PM
How can Client get "Client IP" ? polarpolar Python 1 07-22-2004 01:43 PM
How do you get or save a file from/to a client (button on web page) once they are authenticated? The client could be Mac, Linux or Windows. jake ASP .Net 6 07-07-2004 07:48 PM
Help with Cisco VPN client 4.0.1 (and 4.0.3) - The VPN client could not find the adapters GUID MP Cisco 2 12-30-2003 03:55 PM



Advertisments