I used code below to get client ip with asp.net before but after I moved to VDS this function begin returning only my subnet mask which is 178.18.198.1 or 178.18.198.2. Can
I use
IP.Text = Request.UserHostAddress;
In C#. Does that work for you?
Problem solved by using HTTP_CLIENT_IP instead of REMOTE_ADDR in sourcecode files.
The problem about IIS Logs was solved by installing IIS Advanced Logging module as suggested here. Also I got error "503: Service Unavailable" after installing Advanced Logging but solved this by granting read-write permissions to Everyone for Program Files\IIS folder and started failed application pools.
http://kb.parallels.com/6735
Another solution suggested here is:
On the NetScaler under "load balancing", "Services" then under the advanced tab, under settings, check the box for "Use Source IP" and "Client IP" then in the Header field "CLIENT-IP"