1

I developed a Web API service, and now I'm trying to test it (inside IIS Express in Visual Studio 2013). It works good, but I can use only the address:

http://localhost:62576

Instead of localhost I want use my private IP address (192.168.1.2)

Searching others stackoverflow questions I found this . So I have modified the config file, the line:

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

into

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

But I have always the same error, when I try to call the service using my private IP address:

HTTP Error 400. The request hostname is invalid.
Community
  • 1
  • 1
GVillani82
  • 17,196
  • 30
  • 105
  • 172

1 Answers1

1

Have you tried using the 127.0.0.1 local IP. This is a loop-back to your own machine, but might work. Should you call it with that IP it might just solve the translation error.

http://localhost:62576 can be changed to http://127.0.0.1:62576

Hope it might help!

(thanks for the correction Joseph, I was thinking home setup not machine).

Daniel ZA
  • 306
  • 2
  • 10