3

I am attempting to deploy an ASP.NET web api web service to SharePoint. I attempted to deploy the necessary folders to the ISAPI folder, but have had no luck.

Has anyone successfully deployed a Web API web service to SharePoint? If so, can you please provide the steps?

1

NOTE: I would only recommend this solution in a very limited number of scenarios. Single server / simple development and test scenarios are the most likely. If you have a production farm with multiple servers I would recommend taking a look at alternatives that are better supported (self hosted apps for example).

With that in mind, if you don't need any integration with SharePoint but just want to host your Web API in the same site you can create an application off the root of the SharePoint site. Then just add the correct sub directory to your path.

If you where using http://sample.com/api/value, use http://sharepoint.com/subapp/api/value.

enter image description here

  • While technically you /can/ do that, you should avoid it in production environments as it can reduce the reliability of the environment, adding new servers to the farm won't have this configuration replicated to them, among other possible issues, if someone tries to create a sub-site with the same name you'll get errors and other unpredictable results.... – Choggo Dec 3 '14 at 21:16
  • Absolutely, that's why I prefaced my answer with 'If you don't need any integration with SharePoint.' This is useful in limited scenarios only. – Joel Tipke Dec 5 '14 at 11:04
  • Totally missed that =/ If you edit the post some I can remove the downvote – Choggo Dec 5 '14 at 11:08
  • Then again, you mentioned integration, not SharePoint integrity. While it works, I think the risks of putting this configuration into a production environment should be made clearer - harder to deploy and maintain to farms with multiple front ends – Choggo Dec 5 '14 at 11:18

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.