WCF - “There was no endpoint listening at…” error

后端 未结 3 1326
孤城傲影
孤城傲影 2021-01-18 02:41

I have two applications that I want to test locally on the same machine. App 1 has a simple WCF service with the folloiwng config entry:



        
相关标签:
3条回答
  • 2021-01-18 02:47

    It looks likes the issue is due to the fact that both server and client are being run from the Cassini server. I am changing the architecture to host the server endpoint in IIS.

    0 讨论(0)
  • 2021-01-18 03:00

    Do you have two applications ?

    One which hosts the server endpoint and the other which is the client ? Are both active in IIS (considering the second application is a web app) ?

    If you have two projects for those two components in your solution, you can configure VS to start both project at the same time. This way you can put breakpoints on both the client and the server and see if the server really gets called by the client or if the exception happens without the server method being called.

    0 讨论(0)
  • 2021-01-18 03:01

    If your web service is on: http://localhost:8000/ContainerManagementService.svc

    Your client app2 should point on this same addres:

    <client>
          <endpoint address="http://localhost:8000/ContainerManagementService.svc"
            binding="basicHttpBinding" bindingConfiguration="basicHttp"
            contract="MyService.IService" name="externalService" />      
    </client>
    
    0 讨论(0)
提交回复
热议问题