startNet
startNet

Reputation: 274

127.0.0.1 does not work, but localhost works fine

What could be the reason that 127.0.0.1 is not working?

localhost works fine

In file:

C:\Windows\System32\drivers\etc\hosts

There is a records:

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost

I am building a .NET application with SOAP

Project URL http://localhost:1399/Services

I will add that if I change Project Url to 127.0.0.1, it also doesn't work

EDIT:

Note when I try to set another Project URL

enter image description here

Upvotes: 0

Views: 1986

Answers (1)

NetCoreDev
NetCoreDev

Reputation: 325

Enter the catalog:

.vs\YourApp\config\

Edit file applicationhost.config

Find the line:

<binding protocol="http" bindingInformation="*:1399:localhost" />

Replace it with

<binding protocol="http" bindingInformation="*:1399:*" />

* will make it accept everything so you can use a different IP (e.g. in the android emulator it can be 10.0.2.2 or in the browser 127.0.0.1)

Upvotes: 1

Related Questions