This only happens on one particular Controller Action
If I pass to the UrlHelper a controller of “Home” and an action of “Index”, the virtual path gets returned as “/”. On all other controller actions, the virtual path is returned correctly.
I’ve used .NET Reflector, but it’s only getting me so far. What would cause the path to be returned as “/” and not “/home/foo” on only one controller action?
In a default MVC project,
/Home/Indexpath is the same as/because it’s set to be default. Changing the name of yourHomecontroller or changing the default route, will show you that the problem is not in the controller, but your default route settings.