I have an asp.net mvc 2 app (using .net 4.0) that isn't routing correctly when hosted in a virtual directory. I have the following simple routing rule:
routes.MapRoute(
"Default", // Route name
"{action}", // URL with parameters
new { controller = "accounts" } // Parameter defaults
);
I'm trying to resolve http://mydomain.com/accounts/new. Where "accounts" is a virtual directory. If I put the app in the root of an IIS website it routes fine for http://mydomain.com/new, but if I put the app in a virtual directory I get 404 errors. I've debugged and it is executing global.asax and configuring routing when in the vdir. Is there something special I need to do for routing in a virtual directory?
FYI. I'm using a vdir because the root has wordpress in it.
Thanks!
one more thing is that if I specify a default action in parameter defaults, it will execute the default action/controller, but it never matches anything else.