I have several web services that run internally that are utilised within SharePoint. We are using SharePoint 2013 On Prem but are planning a move to the cloud. I currently have a farm solution which acts as a proxy to call these web services, so I can make ajax calls from within SP and avoid any cross domain issues.

With the move to the cloud, I need to expose the data retrieved from these web services to be used in SPFx Client Side Web Parts or SharePoint Hosted apps. So far, in a development environment and with an O365 developer subscription, I have created a provider hosted app with an associated MVC web application and have used WEB API 2 to call these web services and pass the data - again the MVC app acting as a proxy. When we migrate, the MVC app will be hosted internally and therefore be able to call the internal web services.

The part I can't figure out is how to call the web api in the provider hosted app from other apps/web parts in the site. I'm trying to replicate creating a web service in the cloud as I have done with a farm solution and stored in the ISAPI folder. I'm looking for advice on how I can access the web service within the provider hosted app from other apps/web parts within the same site as the provider hosted app.The internal web service can not be made public. Any advice appreciated. Thanks!

  • Hi @Phillip Hill, welcome to SharePoint StackExchange :) , Could you please take a quick tour at sharepoint.stackexchange.com/tour to get informed badge! Thank you for your contribution :) – Mohamed El-Qassas MVP Jun 5 '17 at 22:26
  • I am so happy you asked that. Please check out this video an join us on out bi weekly call this Thursday if you are available. – russellg Jun 6 '17 at 1:07
  • Damn, I cant find the video. But its by the office-dev-pnp team. Google it and you'll find it, They have a skype meeting Thursday at 10:00 AM EST. – russellg Jun 6 '17 at 1:19
  • Ah, here it is github.com/SharePoint/PnP-js-core/wiki – russellg Jun 6 '17 at 1:28
  • Thank you russelg but I can't seem to find the information I need in that link. I have googled this issue but can't seem to find what I'm looking for to surface the web service provided in the provider hosted app to other apps. If I load the app, yes everything works from within it, but from other apps/fiddler, I can't access the data. – Phillip Hill Jun 6 '17 at 7:07

Your Answer

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

Browse other questions tagged or ask your own question.