I'm developing provider-hosted SharePoint 2013 App with Windows Azure as a backend. I created an app event receiver to fire when app is installed. When i publish my Web App (.NET MVC4) to Azure, everything works as expected, event is firing, but when i try to debug and run Web App on localhost i get the exception:

App failed to install, cleaning up...
Successfully uninstalled the app for SharePoint.
App installation encountered the following errors:
Error 1        
CorrelationId: 0dce0e63-83c2-4546-a6a7-4e75d9cee9ff        
ErrorDetail: The remote event receiver callout failed.        
ErrorType: Transient        
ErrorTypeName: Intermittent        
ExceptionMessage: There was no endpoint listening at http://localhost:50209/AppEventReceiver.svc that could accept the message. 
This is often caused by an incorrect address or SOAP action. 
See InnerException, if present, for more details.        
Source: Common        
SourceName: Common App Deployment

Do anybody have any idea to solve this problem?

Thanks in advance!


2 Answers 2


"Localhost" refers to the local machine, which in the context of an App Install, would be the server itself. From Kirk Evans' blog:

If we told O365 that our WCF service was available at http://localhost:44307/AppEventReceiver.svc, that server would try to make an HTTP call to localhost… the HTTP call would never leave that server. There’s no way that SharePoint can figure out that what you really meant was to traverse your corporate firewall and get past the Windows Firewall on your laptop to call an HTTP endpoint in IIS Express.

The documented way to debug remote event receivers is to set up an Azure Service Bus connection (explained in the link below), but I find it easiest to use Cloud Explorer in Visual Studio, right-click your web app and select "Attach Debugger". This sets up a remote debugging session where you can debug your code right from Azure.




Error: "There was no endpoint listening"

You get the following error when your handler runs in production:

"The remote event receiver callout failed. Details: There was no endpoint listening at https://{domain}:nnnnn/{path}/AppEventReceiver.svc that could accept the message. This is often caused by an incorrect address or SOAP action." where nnnnn is a port.

SharePoint requires that there be no explicit port in the URL of the handler in production. This means that you must use either port 443 for HTTPS, which we recommend, or port 80 for HTTP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.