New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the Community Exchange, where community members ask and answer questions about DNN. To get started, just start typing your question below and either select one of the suggested questions or ask a new question of your own.

MVC Custom Module WebAPI conflict

Return to previous page

  • 3/9/2017
  • 1640 Views

Question:

Artur Leite 8 years ago

Hi guys! I have a custom MVC Module with the following routes configured:

  • mapRouteManager.MapRoute(<moduleName>, "default", "{controller}/{action}", new[] { <moduleNamespace> });
  • mapRouteManager.MapRoute(<moduleName>, "default", "{controller}/{action}/{resource}", new[] { <moduleNamespace>});

I have a HTTP/Text Module that interacts with theWeAPI and everything works fine and the world is great. I can even call any method using fiddler (e.g., http://hostname/DesktopModules/MVC/<moduleName>/<Controller>/<Action>).

Now the trouble begins. I installed a third party module that also registers two routes:

  • mapRouteManager.MapHttpRoute("MyDnnSupport.LiveChat", "default", "{controller}/{action}", new[] { "MyDnn.Modules.Support.LiveChat.Services" });
  • mapRouteManager.MapHttpRoute("MyDnnVisitorsOnline", "default", "{controller}/{action}", new[] { "MyDnn.VisitorsOnline.Services" });

After installing this extension, my module breaks. Any request, to my module (webpage or fiddler), returns 404 Not Found. If I restore my DNN and Database to the point before installing the extension, everything works again.

I already checked if IIS had turned my module into a Virtual Application, but that's not the case.

I also tried to change the "default" part of the route to something else, but nothing changes.

Is this problem a conflict between the route mapping of both modules? What can I do to fix this?

Thanks,

Artur Albquerque

MVC Custom Module WebAPI conflict

Artur Leite
Artur Leite 8 years ago
Add an Answer

Answers

Sign In to Participate
Or register to become a member