문제

Possible Duplicates:
How to get my own IP address in C#?
How to Get IP Address?

I want to store the IP Address to the DataBase table through C#.Net coding. How to get the static IP Address(What we get from www.whatismyip.com) using C#.Net? What are the ways to retrieve it?

도움이 되었습니까?

해결책

You can get it through HttpContext.Current.Request.UserHostName

다른 팁

You can get it like this:

HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top