0

I develop a provider-hosted app for our SharePoint 2013 on-premise environment, which has an app installed event receiver.

Is there any way to develop an app, which includes event receivers on a local client (which is not the SharePoint server)?

Until now, I made my developments on the server itself over a RDP connection. Now I want do develop on my local client, which should be no problem in general.

But - because the app has an event receiver - of course an error occurss:

ErrorDetail: The remote event receiver callout failed.

ExceptionMessage: There was no endpoint listening at https://localhost:44301/Services/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.

This makes sense, the SharePoint server tries to call a webservice on localhost, but the web service is running on my local client, not on the server.

At the moment I do not want or need to debug the remote event receiver, I just want to get the application working.

I tried to change the ~remoteAppUrl in the <InstalledEventEndpoint> to the url of the currently deployed productive version, but it doesn't work (different ClientId etc)...

Currently the workaround to continue developing on the web app itself is to disable all event receivers, which is difficult if the event receiver make important things.

0

I can't add comment so I am putting it in answer.

I guess your SP server is a hosted one and your local client machine is not having a static IP that can be accessed over the internet. Otherwise if your SharePoint server is in same network as your local development machine then you can replace ~remoteAppUrl with the IP/Name of your client machine.

How about separating out your web app in two parts. Or just keep a copy of it on your server temporarily. This way it will have the same client Id and client secret as your local copy (that you will use for rest of the application except app events).

Use the app event handling (wcf service part of your web app) from the SharePoint server, i.e, for the event handling provide the hard-coded url of localhost in app manifest. But for default page, use the regular ~remoteAppUrl which presumably can be your local machine during development phase.

Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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