Support for Mono

Jul 3, 2012 at 7:55 PM
Edited Jul 3, 2012 at 7:56 PM

I am trying to use MvcCodeRouting in an MVC 3 site for Mono (2.10.?).

I have taken the same code and hosted it in IIS, and everything works perfectly.  Bravo on such a great project!

Now, the issue is that when running against Mono, any action links created are ignored (don't work at all) unless the current page is the page that the action link is referencing...


A link created like so:

@Html.ActionLink("My Link", "MyAction", "~Account.Services", new { id = 1 }, null)

will not work unless you are viewing a page within the MyApp.Controllers.Account.Services namespace

from the home page, a link for /Home/Login will work, but nothing outside of that namespace.

Any thoughts on why this might be, or is there a way to see if an error(s) are getting trapped and not reported?

Thank you.

Jul 4, 2012 at 1:36 AM

I was able to reproduce, URL generation does not work on Mono. To find the issue I need to run MvcCodeRouting with debugging, do you know how to debug an ASP.NET app on Mono?

Jul 4, 2012 at 6:24 AM

Well, the way I see it, you have a couple of options...  MonoDevelop or running the site in XSP (on windows) and attaching VS to the process.

I'm not 100% sure that #2 will work.

I got as far as pulling in the latest code and attempting to debug in MonoDevelop, but I couldn't get the debugger to start.  I kept getting errors that I learned (from good ol' Google) had to do with x86/x64 differences between the debugger and my project.

I've gotten so far behind on my project trying to get it to work in Mono, I just switched back over to my IIS box for the time being.

I would actually go the XSP/VS route first, if I were you, but VS has me spoiled. :)

~Joshua Foulk

Jul 4, 2012 at 4:18 PM

I also tried MonoDevelop with no luck. Another option would be debug a console app on mono, the routing bits can be mocked.

Jul 4, 2012 at 4:26 PM
Edited Jul 4, 2012 at 4:27 PM

Not a bad idea. I was not sure how much work it would be to mock the request/routing side of things.

Jul 4, 2012 at 4:28 PM

It's easy, I'm already using Moq on the tests project.

Jul 4, 2012 at 4:32 PM
I suppose that does make it easy.

Would you let me know if it's something I can just change here, or are you planning on pushing another release when you figure out the cause of the issue?

By the way, thanks for your attentiveness. Mono support is not a high priority for many .Net projects. I appreciate you taking the time to look into it.
Jul 4, 2012 at 4:37 PM

It would be nice to have Mono support for v1, but it's not a priority. I'd be happy to work on it, if I get help getting some kind of debugging on Mono.