开发者

Finding the IP Address of my system on asp.net page

开发者 https://www.devze.com 2023-01-14 00:10 出处:网络
I need my system IP address. I\'ve used Request.ServerVariables[\"remote_addr\"] but it is being provided IP address of my network(intranet) not my local system ip.

I need my system IP address. I've used Request.ServerVariables["remote_addr"] but it is being provided IP address of my network(intranet) not my local system ip.

Actually I've set session state of开发者_JS百科f and want to identify the user request. So i want to fetch the system IP not router/network IP. Please tell me the appropriate solutions.


Request.UserHostAddress. Try this.


try this

how to get ip address of machine in c#


You should be able to use:

Request.ServerVariables["LOCAL_ADDR"]

As seen on: http://msdn.microsoft.com/en-us/library/ms524602(VS.90).aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消