简体   繁体   中英

User IP in a Remote Desktop Connection

I am building an ASP.NET application

If I run a website in a remote connection, what is the Ip that i get from System.Web.HttpContext.Current.Request.UserHostAddress ? Is it the ip of my local network or the ip of the network that the remote computer is connected?

I need to detect the ip of the network that the user is actually using, not the one of the remote computer.

Any ideas?

Is it the ip of my local network or the ip of the network that the remote computer is connected?

It will be the local IP.

I need to detect the ip of the network that the user is actually using, not the one of the remote compute

Forget about this requirement. This information is not part of the HTTP protocol specification and is never sent to the server. You will need to either provide an input field on your site where you could ask the user to enter this information or have some desktop application running on the server that will be used to detect the IP of the remotely connected user and then launch the default web browser by navigating to your web application and passing it as a query string parameter for example.

Yet another possibility you may consider is to use some sort of ActiveX control that will retrieve this information. But we all know the constraints that come with ActiveX.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM