ADO DOT NET Posted January 17, 2007 Posted January 17, 2007 Hi, In VB6 I was getting the users IP by placing a winsock control on the form and : Winsock1.LocalIP Now in .NET how can I get the IP address of machine? Thanks:) Quote
Administrators PlausiblyDamp Posted January 17, 2007 Administrators Posted January 17, 2007 Dim ip As System.Net.IPAddress ip = System.Net.Dns.GetHostEntry(System.Net.Dns.GetHostName()).AddressList(0) should do the trick, if you have more than one ip address though you will need to loop through the AddressList to find them all. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.