A web site code can't connect to a soap service on the same server

前端 未结 2 1906
既然无缘
既然无缘 2021-01-16 11:27

My ASP.NET web site calls a .net service from a code in App_Code to retrieve some information.

The web service is hosted at http://mydomain/ws/DirectoryService

2条回答
  •  野的像风
    2021-01-16 12:00

    Ensure you are running the webservice and website on different ports, and make sure your configuration reflects the correct port.

    If you are running two websites on the same port (by default this would be port 80, reserved for HTTP), they will conflict with each other - one of them will get the port, the other will not.

    Say you change the web service port to 8080, you would configure the site to use the endpoint:

    address="http://mydomain:8080/ws/DirectoryService.asmx"
    

提交回复
热议问题