none
Error: Could not find default endpoint element RRS feed

  • Question

  • I have an application on PC A that is calling a Windows web service (service A) that I wrote that is hosted on Server A and calls a web service that I also wrote (Service B) that is being hosted in IIS on Server B.  In testing, I have no problem accessing Service B from Service A. But, when I access Service A from my application, I get an error at the point where it tries to call Service B. The error is: "Could not find default endpoint element that references contract 'ServiceB.IVWS1' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.".  Since I can run it in testing, I figure the problem is that it can't see the configuration file for Service B. But I have tried everything I can think of to get it to see the config file. Can anyone help?
    • Edited by GretchenF Wednesday, December 28, 2016 2:18 PM
    • Moved by Neda Zhang Thursday, December 29, 2016 6:06 AM Moved from vb.net
    Wednesday, December 28, 2016 2:17 PM

Answers

  • According to our Sys Admin it is wide open with no security at all yet. I have full access to it. Which is why I have been thinking that for some reason it cannot find the config file. I had to manually movve it and I put it into the bin folder for Service B. Is that correct?

    No that is not correct. What config file are you talking about, an app.config or a Web.config? You indicate that SeviceA is a client to ServiceB. You have a Windows desktop program I assume that has an app.config that has an endpoint in it pointing to ServiceA, which I'll assume is a WCF Web service. Then ServiceA is a client to ServiceB, which I'll assume is another WCF Web service.

    And what is happening to the runtime config for the desktop program, which is called Programname.Exe.Config where .NET expects to find the runtime configuration information? The runtime config for an exe type project is derived from the app.config of the Windows project that is created upon the successful build of the project. It is setting in the Bin folder of the exe project type that must accompany the programname.exe when programname.exe is deployed?

    • Marked as answer by GretchenF Thursday, December 29, 2016 7:40 PM
    Wednesday, December 28, 2016 5:34 PM

All replies

  • Either the endpoint is not there to be seen as not in the client side Web or app.config,  or a firewall is blocking access to the service.

    WCF and legacy Web services issues can be discussed at the below forum.

    https://forums.asp.net/28.aspx/1?WCF+ASMX+and+other+Web+Services

    Wednesday, December 28, 2016 2:54 PM
  • The endpoint is in the app.config and I know it can be found because when I run a testing app that directly accesses Service B, it works fine. It can also access Service B from a different machine. The server that Service B is on is a new one just being set up and does not yet have any kind of security. That is why I am thinking that my app can't find the app.config when it goes through the first service.
    • Edited by GretchenF Wednesday, December 28, 2016 3:34 PM
    Wednesday, December 28, 2016 3:34 PM
  • The endpoint is in the app.config and I know it can be found because when I run a testing app that directly accesses Service B, it works fine. It can also access Service B from a different machine. The server that Service B is on is a new one just being set up and does not yet have any kind of security. That is why I am thinking that my app can't find the app.config when it goes through the first service.

    If ServiceA is a client to ServiceB, then it is ServiceA'a Web.config that must have the client-side endpoint for ServiceB to contact ServiceB.

    Wednesday, December 28, 2016 3:56 PM
  • Yes, it is in there.
    Wednesday, December 28, 2016 3:59 PM
  • Yes, it is in there.

    Then it comes down to -- is there something blocking the access, like a firewall?
    Wednesday, December 28, 2016 4:57 PM
  • According to our Sys Admin it is wide open with no security at all yet. I have full access to it. Which is why I have been thinking that for some reason it cannot find the config file. I had to manually movve it and I put it into the bin folder for Service B. Is that correct?

    Wednesday, December 28, 2016 5:15 PM
  • According to our Sys Admin it is wide open with no security at all yet. I have full access to it. Which is why I have been thinking that for some reason it cannot find the config file. I had to manually movve it and I put it into the bin folder for Service B. Is that correct?

    No that is not correct. What config file are you talking about, an app.config or a Web.config? You indicate that SeviceA is a client to ServiceB. You have a Windows desktop program I assume that has an app.config that has an endpoint in it pointing to ServiceA, which I'll assume is a WCF Web service. Then ServiceA is a client to ServiceB, which I'll assume is another WCF Web service.

    And what is happening to the runtime config for the desktop program, which is called Programname.Exe.Config where .NET expects to find the runtime configuration information? The runtime config for an exe type project is derived from the app.config of the Windows project that is created upon the successful build of the project. It is setting in the Bin folder of the exe project type that must accompany the programname.exe when programname.exe is deployed?

    • Marked as answer by GretchenF Thursday, December 29, 2016 7:40 PM
    Wednesday, December 28, 2016 5:34 PM
  • Hi GretchenF,

    Thank you for posting in MSDN forum.

    Since this forum is discussing and asking questions about the Visual Basic programming language, IDE, libraries, samples, and tool,and your issue is more related to WCF, I will move this thread to the more related forum for better support.

    Reference: https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wcf

    Thanks for your understanding and support.

    Best Regards,

    Neda Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, December 29, 2016 6:04 AM