Using VB.NET How can I retrieve the remote host IP Address?

Posted on 2004-10-29
Last Modified: 2008-01-09
I would like my intranet applcation to retrieve user ip addresses and store them in sql. What VB.NET code accomplishes the ip address retrieval?


Paul G
Question by:pgilfeather
    LVL 15

    Accepted Solution

    Dim ip As String = Request.UserHostAddress
    LVL 18

    Expert Comment

    pgilfeather needs in intranet invironment

    If you are using TCP sockets
    see these links

    see this link for converting any Hostname to IP address and vica versa

    Author Comment


    Thanks. That was the correct answer and solved my problem with no messing about.


    Paul G

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Course: JavaScript Coding - Massive 12-Part Bundle

    Regardless of your programming skill level, you'll go from basics to advanced concepts in a vast array of JavaScript subjects including Sammy.js, Agility.js, Ember.js, Node.js, jQuery, AJAX, Extjs, AngularJS, Knockout.js, and JSON.

    If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
    A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    913 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now