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

  • SEARCH
  • Home
  • 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 6185901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:47:46+00:00 2026-05-24T01:47:46+00:00

I use Requestl.Url in my ASP.NET MVC application to provide a new page the

  • 0

I use Requestl.Url in my ASP.NET MVC application to provide a new page the URL of a returning page. Everything works fine, until I tested my page on an android emulator.

There I used http://10.0.2.2/ to address my local host. But Request.Url gives me “http://localhost/”.
That is a problem, since “localhost” points to the real local host of the android phone and “10.0.2.2” to my PC’s host.

Why does ASP.NET replaces the IP-address by the localhost name? How can I prevent this?

Thanks, Konrad

  • 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-24T01:47:46+00:00Added an answer on May 24, 2026 at 1:47 am

    If I am understanding your post correctly you are pointing the android emulator to your pc and it is redirecting you to localhost

    1st note i should point point out if you are using the Cassini development server built in to visual studio you can’t do it like that as it will only accept connections from localhost

    As the Android emulator is seen as an external device (even tho it is on your computer) Cassini will not likely accept these connections I’m not sure if that is related to the root cause of your problem or not tho

    the other option is to set up a dummy URL for local debugging by adding an entry to your hosts file e.g. myapp.local or asp.localhost.app etc. and pointing it to your PC localhost you will need to likely use IIS Express or IIS full for the purposes of debugging and set it up to accept your host file entry as a binding for the given site you are using

    I had to do something similar with a Windows iPhone emulator i was using

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

Sidebar

Related Questions

I am trying to use JQuery Datatable plugin in ASP.NET MVC application. However, although
I am writing an ASP.NET MVC 2.0 application which requires users to log in
I'm using ASP.NET MVC Preview 4 and would like to know how to use
I'm trying to use the geocoding code from here in my ASP.NET MVC 2
In my ASP .NET MVC 2 - application, there are several controllers, that need
I have an ASP.NET MVC application. In the application, I have a bunch of
Suppose I have a DB full of health records and an ASP.NET MVC application.
I am using the Redirect After Post pattern in my ASP.NET MVC application. I
We are currently developing an application based on NHibernate and ASP.NET MVC and a
I am developing the ASP.NET MVC 2 application . I want to show the

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.