8

I would like to use ASP.NET WebApi inside a SharePoint 2013 farm solution.

I know it is not supported out-of-the-box, but I found SignalR can be run by means of a simple HttpModule, so I was wondering whether a similar appoach could be used.

Thanks in advance, Rich

Cross Post @ https://stackoverflow.com/questions/16447751/sharepoint-2013-and-asp-net-webapi

Update 1 I wrote a module to map HttpRoutes similar to the one in the referenced article:

  • When turned OFF, I get a 404 - Not Found (which is OK)
  • When turned ON, I get a 401 - Unauthorized from SharePoint

No matter which controller&action I pick.

My guess is WebApi should be integrated somehow with SharePoint security. Tips?

0

Did you implement a virtual path provider like written in my blog post mentioned above? If not, you need one.

Edit: You can see the sourcecode here: https://spsignalr.codeplex.com/

| improve this answer | |
  • 6
    Can you please add more details about how to do what you propose? – Robert Lindgren Nov 13 '13 at 6:47
0

I haven't figured out how to host a custom WebApi in SharePoint, or determined if it's even possible at all. You can host a custom WCF REST service in SharePoint 2013 though. I have a video walkthrough of the process on YouTube.

Building a SharePoint-Hosted WCF Service

| improve this answer | |

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.