It can be opened with localhost, but not with IP address. The request host name is invalid

Problem point
the webapi compiled by vs can only be used

http://localhost:64734/API/Default/GETIP 

unavailable

http://127.0.0.1:64734/API/Default/GETIP

The solution is
1, find the. Vs folder

2, find the file D: desktop, webapiarduino. Vs, config, applicationhost. Config
the path depends on the project.

D:\Desktop\WebAPIArduino

After searching the localhost, change the localhost to *

the modified result

is valid.

Read More: