简体   繁体   中英

Deploy web service application to network static IP address

I have created a web service application in Visual Studio. The Web service can be accessed by the following URL.

http://localhost:1863/WebServiceTest.asmx (when in Debug mode) http://192.168.1.252/WebServiceApp/WebServiceTest.asmx (after publish through IIS)

The program still works if I replace "192.168.1.252" to the static IP address of the network. However, the same URL will not work if not using the same network - a *"Connection refused" error is returned.

How can I fix or debug this?

What I have done:

  1. Added TCP port 80 in both the inbound and outbound rule using Windows Firewall with Advanced Security .
  2. Changed the PC to use a static IP address (192.168.1.252).
  3. Forwarded port 80 to the static IP address (192.168.1.252) and port 80.
  4. Turned off the firewall.
  5. netstat -a show port 0.0.0.0:80 is Listening .
  6. telnet "network static IP address" "80" fail to connect.

You should set :port in IIS setting of your website:

IIS* → right click on your website* → click Edit Binding → on the form, select row → edit → change the port and then save.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM