Rest API

0
0

Hi,

do you have any working example ApiController inside wisej web application? I have searched around but nothing work for me, even Nancy library.

Thank for your help,

Page

  • You must to post comments
0
0

You have to tell ASP.NET WebApi (or Nancy – which is abandoned now) to ignore *.wx requests. Otherwise their api router takes over. With ASP.NET WebApi simply add this to RouteConfig.RegisterRoutes:

public static void RegisterRoutes(RouteCollection routes)
{
  routes.IgnoreRoute("{*.wx}");  // <-  ADD THIS
  routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

  routes.MapRoute(
     name: "Default",
     url: "{controller}/{action}/{id}",
     defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
  );
 }

 

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.