Domanda

I have a visual studio solution with the folowing projects:

  -Provided hosted app 
  -Asp.net MVC 
  -Asp.net Web api

Is it possible to use CSOM within Web api project? So I can consume the web api form the MVC project. I've done some research and I can not find any example. I just found a way to make CSOM work on an API within MVC project, but not in a different project. Both projects are located on Azure

È stato utile?

Soluzione

The fact that SharePoint Helper class are designed to work with MVC Controller makes a case for modification in these helper files to adapt to WebApi ApiController.

There is this blog Getting SharePoint 2013 apps and WebAPI to work by Bas Lijten which should lead you to the solution.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top