I noticed I have the name controller in the controller as the name of the controller but even if i take out Controller so it is just controller="NewListingPage" it still fails. I tried changing the direction to "SuppoprtedDirection.Both" and that fails to do anything but throw a 404 as well.
Have you tried to remove the line
if
(!ContentReference.IsNullOrEmpty(ContentReference.StartPage))
your code doesn't seem to be dependent on StartPage anyway. The request from IIS when RegisterRoutes is called is typically called with host 127.0.0.1 meaning ContentReference.StartPage will only be set if you have a site with '*' defined in host mapping.
Maybe it's because of the sea bug that I have, read more here;
http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=86459
I am really strugging to add a new url route to the routes collection. I have the following code.
This always results in a 404. I have the following action as well.
Why is this never hit. I have tried almost everything to get this workig and I cannot figure it out. WHAT AM I MISSING.
Thanks in advance.