Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6636007
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:07:48+00:00 2026-05-25T23:07:48+00:00

I have an ASPX MVC v3 applications that is using String sourceIp = Request.ServerVariables[REMOTE_ADDR];

  • 0

I have an ASPX MVC v3 applications that is using

String sourceIp = Request.ServerVariables["REMOTE_ADDR"];

to get the IP Address. The problem is that this is returning me the IPv6 version. I need the IPv4 version.

My understanding is that there is nothing the website can do to get the IPv4 version, what I need to do is tell the server (my computer, this is local development) to use IPv4 instead of IPv6.

We have turned off IPv6 in the Local Area Connection Status -> Properties but its still grabbing the IPv6 version.

How can I get the IPv4 address?

Note: I need the IPv4 because we are using a third party service that requires the ip as one of the parameters in IPv4 format.

ANSWER

Need to wait 8 hours before I can post answer

Worked out an easy work around. When I press debug it opens up IE with http://localhost:8023/mysite, if change the localhost to 127.0.0.1 then it will use 127.0.0.1 as the ip address, which is IPv4 format.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:07:49+00:00Added an answer on May 25, 2026 at 11:07 pm

    Worked out an easy work around. When I press debug it opens up IE with http://localhost:8023/mysite, if change the localhost to 127.0.0.1 then it will use 127.0.0.1 as the ip address, which is IPv4 format.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MVC site that will be using an ASPX control that probably
I have an ASPX page and on this page I have a control that
I have an ASP.NET web page(Not MVC ) (HomePage.aspx) and another page (PRiceList.aspx).I have
I have an MVC 1.0 app just setup but it only shows the Index.aspx
I have an ASPX page (On server A) which is invoked using NTLM credentials.
I have several aspx pages that can be opened either normally (full screen in
This is going to sound quite bizarre. I have one ASP .NET MVC 2
I am using my own controller factory in an MVC 2 app, and this
I am developing an application using MVC Preview 5. I have used typed views.
I have an application that I've been using xVal successfully on for quite some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.