locked
"EndPointNOtFoundException There is no endpoint listening" error when a WCF service is hosted on IIS RRS feed

  • Question

  • I am creating a WCF service (say Service1) which consumes a third party WCF service (say Service2). The Service2 is accessible over internet and supports WSHTTPBinding using https and certificate authentication.

    When I run Service1 from within visual studio (VS) it works fine. But if I publish Service1 on local IIS and try consuming from another application or WCF test client, I can call Service1 but the Service1 fails to call Service2. It throws an exception

    There was no endpoint listening at %Service2 URL% that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

    Inner exception : No connection could be made because the target machine actively refused it

    Is this related to IIS security configuration or something because the same service works from VS?

    Thanks in anticipation.

     

    Thursday, June 2, 2011 1:46 PM

Answers

  • The first thing to check is that your visual studio runs with your user (probly) and your credentials, and the IIS app pool runs with other (network service credentials maybe?), try making the IIS app pool run with your credentials...

    • Marked as answer by irtaiza Thursday, June 2, 2011 3:42 PM
    Thursday, June 2, 2011 3:04 PM

All replies

  • The first thing to check is that your visual studio runs with your user (probly) and your credentials, and the IIS app pool runs with other (network service credentials maybe?), try making the IIS app pool run with your credentials...

    • Marked as answer by irtaiza Thursday, June 2, 2011 3:42 PM
    Thursday, June 2, 2011 3:04 PM
  • Thanks. The issue was indeed with the App Pool identity. When I changed it to run with my credentials it solved the problem.

    But what necessary permissions will be needed to App Pool identity for this to work without my credentials. As in the production we will not be using my credentials would like to know what permissions need to be configured for this to work using networkaccount.

    Thursday, June 2, 2011 3:41 PM
  • To answer that we need details about production environment, for example it uses a proxy server ? has direct internet connection, users are in Active Directory, are you the server administrator ? are you the network administrator too?

    The way should be to create a custom user to run the process just not a generic account.

     

    Friday, June 3, 2011 11:26 AM
  • The production environment 

    • will indeed use a proxy server
    • users will be in activer directory
    • I will have the necessary permissions for local and network administrator

    We will create a service account. But question is what special permissions will be required for this account?

     

    Monday, June 6, 2011 11:49 AM