Troubleshooting Inconsistent Routing Issues

I'm porting an application over from mvc4 to mvc6. Running under windows with iis platform host. rc1-update1.

So far everything is good in windows / iis, but once deployed to linux + mono 4.22, I get lots of weird routing issues including stating its not finding the routes for an action (but everything else in that controller is fine) and sometimes throwing AmbiguousActionException where it seems the candidates are completely off.

I've got this in startup

app.UseMvc(routes =>
        {
            routes.MapRoute(
                name: "default",
                template: "{controller=Home}/{action=Index}/{id?}");
        });

And have marked up actions like such

[HttpGet, Route("/Users/Find/{id?}")
public ActionResult Find(int id){

I'm finding frequent cases where Url.Action just sticks random id's in (even passing null or empty parameters for routing dictionary object).

so the question...

What can I do to better troubleshoot the issues... there are definite differences in the linux and windows environments... whether thats windows vs linux, or dev vs prod, or iis vs kestrel. Is there a routing middleware that helps troubleshoot the problem.

I feel like there is a bug here somewhere but don't even know what kind of information else I can specify, or use to do some more legwork. The places where the routing breaks is intermittent and part of a much bigger solution, so not a simple repro.

Answers


So after fighting oddities here for days on end, I upgraded to mono 4.3.2 on a whim, and things miraculously just started working as expected. Couldnt tell you why, but apparently something in the other versions I tried (4.0.5 and 4.2.2-sr1 or whatever) had issues with parsing urls or something?


Need Your Help

Saving in variables in jquery

jquery ajax variables global

hey there i have this jquery combined with ajax:

I cant invoke javascript from functions on a different class

ios cordova webview modal-dialog

I have a project where I try to invoke some JavaScript from an Objective-C class. It works if everything is in one class (I can call the script).