Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi . im developing an application in android .
this app connects to a web application and Returns data about some products ...
For some reasons i need to connect LocalHost(IIS) .
for this purpose I have to change LocalHost ip (127.0.0.1) to (10.0.2.2) !
But i dont know How !
I Use Windows8
Posted
Comments
Maciej Los 7-Dec-14 6:38am    
So, go to the network devices, choose your network card and change it... but i'm afraid, it won't help you, because internal (LAN) address is not the same as WAN IP address.
Kornfeld Eliyahu Peter 7-Dec-14 6:54am    
Use hosts file - map 127.0.0.1 to 10.0.2.2
seyed mahmud shahrokni 7-Dec-14 7:31am    
would you change and copy that here ? i dont know how to change it
seyed mahmud shahrokni 7-Dec-14 7:46am    
Iv changed it but it doesnt work !

1 solution

You can't change local loopback from 127.0.0.1. It is defined in the RFC[^], it is part of the standard.

I suppose, your "server" has DHCP. You simply need to have your original address AND your desired extra address (10.0.2.2). You can switch to static ip on your interface, and add both addresses, like described here: http://www.tutorialspoint.com/shorttutorials/assign-multiple-ip-addresses-to-windows-8-computer[^].
 
Share this answer
 
v2
Comments
seyed mahmud shahrokni 7-Dec-14 12:45pm    
it doesnt let me to add new Ip Address . Add button is disable
Zoltán Zörgő 7-Dec-14 14:42pm    
Not with dhcp, you have to switch to stratic.
Or, you can add avirtual interface an enable routing

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900