Link to home
Start Free TrialLog in
Avatar of Easwaran Paramasivam
Easwaran ParamasivamFlag for India

asked on

Localhost is not recognized?

I've two application setup. Appserver and Client programs. In App.config files of both if I specifiy localhost my client application is not launching. But if I specify my system IP address it works fine. Why it is happening? How to resolve it?

My laptop IP address is keep on changing time to time. Could you please explain why this is happening?

I would like to work as localhost. Please do suggest solution.
Avatar of AndyAinscow
Flag of Switzerland image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What operating system? Open your hosts file in notepad. It's here:

Make sure you have an entry that reads    localhost

If you have IPv6 on the system and don't use it, delete the entry that reads ::1   localhost

If you do edit the hosts file, make sure when saving you don't accidentally append .txt to the end of the file. It's just "hosts"
Avatar of Easwaran Paramasivam


In host file I provided
myip localhost

But no luck. Could you please some other solution?
I don't completely understand what you're trying to do. Can you leave more details?
Localhost on your machine should be left alone at I don't have a clear picture of your setup.
I try to access a remote url with localhost (Ex: rtcp://localhost:8085/MyCompany.MyApp.MyAdaptor.RemoteAdaptor.rem) is not accessible. If I replace localhost with my IP of my machine then it works fine.
You're not trying to access a remote URL if you're using 'localhost' or your machine's own IP address.

Anyway, does your hosts file have the entry for localhost ?

Depending on the application, it may not accept 'localhost' as a valid entry. Is it a commercial app or in house written? I've seen in house developed software/services where the developers just didn't code 100% correctly and got your results....where the local IP address works but the word 'localhost' does not.
ZabagaR: Could you please say how to resolve it?
In order for me have a chance to help, you need to provide more information and answer the questions I asked in my prior message.
Using localhost I try to access my own IP address.
I've requested that this question be deleted for the following reason:

I did not receive a solution to solve the issue. Hence please do delete this question.
Actually you asked two questions - the second (My laptop IP address is keep on changing time to time) I answered with my first comment.