Issue background
A webservice has recently been written in C #, and is expected to be called through Java. When you use Visual Studio 2013 to debug WebService, you can access the WSDL file through the localhost address in your browser.
Access methods such as: Http://localhost:2256/DataProvider.asmx?WSDL.
However, when using Http://127.0.0.1:2256/DataProvider.asmx?WSDL or using http://[native ip]:2256/dataprovider.asmx? WSDL, the bad request error is displayed.
Now you want other machines to access the native WSDL file, so webservice can use IP address access.
Development environment:
1) Windows 7
2) Visual Studio 2013
Configuration method
1) Find < My Documents >/iis Express folder, open ApplicationHost.config.
2) Locate the <sites></sites> tag in the configuration file.
3) <sites> tag contains many <site> tags to find the <site> tag where WebService is located, such as <site name= "Dataprovider" id= "2" >.
4) Find the <bindings> tag within the <site> tab, and in <bindings> find the Bindinginformation property of the <binding> tag, such as bindinginformation= "*:2256:localhost".
5) Change localhost to *. For more information about Bindinginformation, refer here.
6) Restart Visual Studio 2013 with Administrator privileges .
7) Debug the program.
8) end.
Note
Bindinginformation Setup Method:
1) If you want to bind 80 ports to all IP and do not specify a host name, set to "*:80:".
2) set to "*:80:microsoft.com" if you want to bind 80 ports to all IP and specify the host name as microsoft.com.
2) If you want to bind a 8080 port to a fixed IP (192.168.1.150), set to "192.168.1.150:8080:".
Configure IIS Express to access the debugged Web site via IP address