Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
262 views
in Technique[技术] by (71.8m points)

c# - SharePoint 2019 On Premise - Webhooks subscription with a private EndPoint

We develop a REST MVC Webservice in .net C#, which is able to receive Webhook notifications from our internal SharePoint 2019. It works fine, when I test the application from Visual Studio 2019 with Ngrok but when I publish the service to an IIS web server internally, I still get the following error:

{ "odata.error": { "code": "-1, System.InvalidOperationException", "message": { "lang": "fr-FR", "value": "Failed to validate the notification url ? https://xxxx.xxx.local/api/SPWebhook/HandleSharePointRequest ? " } 

When I debug the Endpoint from IISExpress with Ngrok on my computer, everything works perfectly. The validation token is returned and SharePoint add the subscription correctly (based on official doc: https://docs.microsoft.com/en-us/sharepoint/dev/apis/webhooks/get-started-webhooks). But when I publish this Endpoint to a Web Server IIS in our Private Domain I always received the error above. If I use a Ngrok URL for the notification URL it works but when I use a domain URL servername.domain.local we always get the error.

Does the endpoint URL have to be public, even for SharePoint On Premise ? It seems surprising that for an On Premise version the Endpoint must be public. Is there a way to use a private url for the EndPoint? Many thanks in advance for your help!

question from:https://stackoverflow.com/questions/65919717/sharepoint-2019-on-premise-webhooks-subscription-with-a-private-endpoint

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...