Support for Mono

Imported from the CodePlex archive for reference purposes. Support for MvcCodeRouting has ended.

Commented on

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...

e.g.

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.

Commented on link

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?

Commented on link

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

Commented on link

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

Commented on link

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

Commented on link

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

Commented on link
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.
Commented on link

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.