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

前端 未结 2 1907
既然无缘
既然无缘 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"
    
    0 讨论(0)
  • 2021-01-16 12:06

    Problem solved. It turned out that I needed to Edit an anonymous authentication settings, so that when used (in my case it is always), the code would go under application pool's identity, and not IUSR: enter image description here

    0 讨论(0)
提交回复
热议问题