Search code examples
c#asp.netipclienthttpwebrequest

How to use client's IP when doing HttpWebRequest in ASP.NET


In my website when I am making HttpWebRequest to another website, ASP.NET uses server's IP.

Is there a way to use client's IP to make HttpWebRequest?


Solution

  • You cannot fake someone else IP address in any TCP/IP request, let alone HTTP.

    Even if you manage to fake the IP address anyhow, the server would send the response back to that IP address, where it would be rejected the response, not being expected. And you never see the response.


    If you have a specific problem you are trying to solve, ask a new more specific question. There may be another viable solution.