SharePoint 2013 and ASP.NET WebApi -


i use asp.net webapi inside sharepoint 2013 farm solution.

i know not supported out-of-the-box, found signalr can run means of simple httpmodule, wondering whether similar appoach used.

thanks in advance, rich

update june 2013

made working reworking http module shown in mentioned post:

config.routes.maphttproute(                 name: "defaultapi",                 routetemplate: "kms2013/api/{controller}/{action}",                 defaults: new { }             ); config.includeerrordetailpolicy = includeerrordetailpolicy.always; config.services.replace(typeof(iassembliesresolver), new spassemblyresolver());  hostingenvironment.registervirtualpathprovider(new webapivirtualpathprovider()); 

spassemblyresolver

public class spassemblyresolver : iassembliesresolver {     public icollection<assembly> getassemblies()     {         return new list<assembly> { assembly.getexecutingassembly() };     } } 

webapivirtualpathprovider

same signalrvirtualpathprovider shown in post.

new issue

the problem approach scriptresource.axd , webresource.axd break when sp references them in page. tried add ignore route:

routetable.routes.add(new route("{resource}.axd", new stoproutinghandler())); 

but keep getting 401 unauthorized. removing module clears error, guess we're still lacking 1 last piece of puzzle.

yes, same approach should work.

create web api project , check app init part - follow blog post referenced already.

btw: ask @ sharepoint.stackexchange.com - maybe has better solution.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -