Troubleshooting the error "EndpointNotFoundException […] There was no endpoint listening at […]"
Who is this article for?
Users who encounter the error when signing in to a client app.
IT Administrator permissions are normally required to resolve the issue.
If a client application cannot connect to the back end service then you will see an error message containing the text "EndpointNotFoundException" and "There was no endpoint listening at". There are different versions of the full error message.
This article gives examples of the different messages and describes the causes. These errors can be logged by any client application (e.g. desktop app, Excel Importer, etc.).
Issue
If you are not working in offline mode, when the client application starts up it connects to an application server. It is looking for a specific URL (http(s)://server.domain.com/instance/Service/TngService.svc), also known as the endpoint.
If the client cannot find the endpoint, it will display an error.
There are variations of the basic error message, with each one describing a different error scenario. If you can identify the exact error, you can take the correct steps to fix the problem.
Solution
Below is a list with the variations of the error, what causes each one, and how you can resolve them.
Variation 1: The remote name could not be resolved
Error message
EXCEPTION: EndpointNotFoundException message: There was no endpoint listening at http://server.domain.com/instance/Service/TngService.svc that could accept the message.
[…]
EXCEPTION: WebException message: The remote name could not be resolved: 'server.domain.com'
This means that the server name that is specified in the client application configuration cannot be resolved.
Possible causes include:
- Wrong server name specified in the application config file.
- DNS problem.
Solution
If the server name is wrong , the client application configuration must be changed.
If the server name is correct, check for DNS problems.
Variation 2: No connection could be made because the target machine actively refused it
Error message
EXCEPTION: EndpointNotFoundException message: There was no endpoint listening at http://server.domain.com/instance/Service/TngService.svc that could accept the message.
[…]
EXCEPTION: WebException message: Unable to connect to the remote server
[…]
EXCEPTION: SocketException message: No connection could be made because the target machine actively refused it […]
This means that the server name is being resolved okay.
Possible causes include:
- Port hosting the service is blocked (e.g. by a firewall).
- Server is running, but IIS is stopped.
Solution
Check the application server to be sure that IIS is running.
If IIS is up and running, check the firewalls.
Variation 3: The remote server returned an error: (404) Not Found
Error message
EXCEPTION: EndpointNotFoundException message: There was no endpoint listening at http://server.domain.com/instance/Service/TngService.svc that could accept the message.
[…]
EXCEPTION: WebException message: The remote server returned an error: (404) Not Found.
This means that the server exists, is contactable and IIS is running, but the URL specified in the client application configuration is not correct.
Solution
Correct the URL specified in the application configuration.
Variation 4: The remote server returned an error: (404) Not Found
Error message
EXCEPTION: EndpointNotFoundException message: There was no endpoint listening at https://server.domain.com/instance/Service/TngService.svc/FBA that could accept the message.
[…]
EXCEPTION: WebException message: The remote server returned an error: (404) Not Found.
This error message looks very similar to the message above, but the difference is the '/FBA' at the end of the endpoint URL in the error.
This shows that the client is attempting to authenticate via FBA, but the FBA endpoint is not available.
Normally, this indicates that the client application is configured to authenticate via FBA, and the service is configured to allow only Windows authentication.
Solution
In this case, you would normally expect the server to have the correct configuration, because setting it up to allow only Windows authentication requires changing the default config.
Update the client config, ensuring it uses Windows authentication.
Variation 5: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond some_IP_address:80
Error message
EXCEPTION: EndpointNotFoundException message: There was no endpoint listening at http://some_IP_address/instance/Service/TngService.svc that could accept the message.
[…]
EXCEPTION: WebException message: Unable to connect to the remote server
[…]
EXCEPTION: SocketException message: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond some_IP_address:80
This error means that your client application is configured so that the IP address of the server is used, rather than the name, and that the IP address cannot be contacted.
Solution
If the system has been functioning correctly, investigate why the IP is no longer accessible.
If this is a new configuration, check that the IP address specified in the client config is correct and that the address is contactable.
When reading the errors, note that a single error message will contain more than one exception message.