[Mono-bugs] [Bug 76497][Nor] New - UserHostAddress return server ip, not client ip

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Oct 21 03:57:50 EDT 2005


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by peter at wingsofdeath.nu.

http://bugzilla.ximian.com/show_bug.cgi?id=76497

--- shadow/76497	2005-10-21 03:57:50.000000000 -0400
+++ shadow/76497.tmp.1717	2005-10-21 03:57:50.000000000 -0400
@@ -0,0 +1,48 @@
+Bug#: 76497
+Product: Mono: Tools
+Version: 1.1
+OS: Red Hat 7.3
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: XSP
+AssignedTo: gonzalo at ximian.com                            
+ReportedBy: peter at wingsofdeath.nu               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: UserHostAddress return server ip, not client ip
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+
+I have created a simple webservice. I is made to be able to login, and it 
+will set a database record with the login information and the ip address 
+of the client. Here is the code to get the IP:
+
+private string GetIP() {
+  return this.Context.Request.UserHostAddress;
+}
+
+This code doesn't return the ip of the client, but of the servers network 
+interface.
+
+Steps to reproduce the problem:
+1. Create a webservice which returns the client ipaddress
+
+Actual Results:
+IP of the servers (current) network interface
+
+Expected Results:
+Client ipaddress
+
+How often does this happen? 
+Always
+
+Additional Information:
+I have tested it on 1.1.9.2_2 and 1.1.7 with mod_mono and with xsp. It 
+all gives the same result


More information about the mono-bugs mailing list