Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am trying to get the ip address of users hitting my web service. I have tried the following 2 constructs:

 

Context.Request.ServerVariables["remote_addr"];
Context.Request.UserHostAddress.ToString(); 

 

With no success. Sometimes I will get a real ip address. Usually the first time during the day that I try it but then after that all I get is 127.0.0.1

 

I have tested this from several different system with the same results.

Wanna-Be C# Superstar

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...