Configure IIS Express to access the debugged Web site via IP address

Source: Internet
Author: User
Tags wsdl

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.