views:

189

answers:

1

I have 2 apps

1 Ruby (not written by me. I understand nothing of Ruby) and the other ASP.Net

The Ruby app determines the users's IP address (I'm told "using first IP found in "HTTP_X_FORWARDED" )and passes a hashed version of it to the ASP.Net app.

The ASP.Net app then determines the Client's IP address again (using Request.UserHostAddress) and hashes the value.

Then hashes are compared.

Generally these hashes are identical ( as you might expect) for all our clients.

However we have 1 new client for which this is not the case...

Every computer at his workplace apparently produces hashes which are not equal

How can this be?

+4  A: 

It depends on the proxy they're going through.

The Wikipedia page for the X-Forwarded-For header is informative on this front.

If you want the hashes to match, you should get the data from the same header. UserHostAddress is determined by the REMOTE_ADDR server variable (I believe).

Jon Skeet
Fantastic thanks very much Jon. Saved us a great deal of heartache there :)
Rory Becker